use mapview as background for multiple screens - ios

I'd like to be able to use a map view as a unified background for my app.
So different views would be overlaid on that map view.
Transitions from one view to another would ideally only affect the views on top of the map. Not the map it's self.
Has anyone tackled this before and maybe know the best course of action for achieving it?
Other than load times for the map are there any hard reasons why it might be a poor UI Design?
Thanks
Ben

You could use Container View Controllers to achieve this effect. Take a look at apple docs for that. Basically you're root view would be the map view, and the "contained" views would be overlaid.
Hope this helps,
Cam

Related

UICollectionView vs UIPageViewController

I need to have different full screen views in my app. Very similar to how snapchat works. The views should be able to communicate between each other.
My question is: Should I use a UICollectionView with cells same size as the screen or should I use UIPageViewController?
Please provide some background info to support your opinion!
I think both have pretty different purposes.
UICollectionView is great to build a mosaic of views (think an image gallery for instance), whereas UIPageViewController is kind of similar to the flipping pages of a book. The latter seems to be what you need, but UIPVC doesn't seem to offer many tweaking/customizations, like custom transitions for example. In which case you may want to start from a UIScrollView with paging enabled to recreate something similar but with more potential. Here's an example.
Personal opinion: for this specific case I'd use a page view controller. Collection views have any things you have to consider, like when the device rotates you have to recalculate where you are, which cell you have to display, ask to scroll to the current cell, and if you are displaying a video or using the camera you might have to control it perfectly, otherwise issues will come.
However think about new features that might be added to your app, if you think you might show more than 2 items on screen, then you'd better choose a collection view.
A page view controller lets the user navigate between pages of
content, where each page is managed by its own view controller object.
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPageViewControllerClassReferenceClassRef/
So If you plan to swipe from one ViewController to another, go for PageViewController. If you plan to have only one ViewController that deal with a list of fullscreen image or so, go for a view controller with a collectionView, or maybe your own swipeView.
UIPageViewController use different view controller and load multiple controller so obvisioly take more memory as compared to UICollectionView. So if your required task is less calculation or step to do then its recommended to use UICollectionView, other case preferred way is to user UIPageController.

Xcode 5 - Tabs at the top

I wanna put "tabs" at the top of the view and I don't find in object library... does anyone knows? Thanks for the help.
Examples here:
http://imagizer.imageshack.us/a/img829/1808/47bw.jpg
http://imagizer.imageshack.us/a/img822/7048/oaum.jpg
There's a difference between navigational tabs like the second screen shot has and just a "tabbed" division of information like the first. The first one stays a single screen while the second one could also be considered an application that has different subviews under that tabbed navigation. The first screen is trivial and you should do this with UIViews with UILabels nested into them.
The second screen is more interesting. I don't think it's a good idea to use the built in tabbed navigation handlers because it's just not a good fit for that kind of layout. You could do it but you're writing a lot of code to get it completely like you want it. But if you would want to you could divide the screen with custom containers and trigger segues in the bottom part from the UIButtons you put on top and it's a pretty good way to handle those kind of segues from within Interface Builder.
More information:
http://sandmoose.com/post/35714028270/storyboards-with-custom-container-view-controllers
https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html

What do you call this stacked folders looking view in iOS?

(source: mshcdn.com)
What is this view called?
Its like stacked folders (Cupertino, New York, Austin, Your Location) that when you touch one.
It enlarges and shows more details, is it complicated to create?
And can someone please show me a link, on how to create one?
Thanks.
It looks a lot like an Accordion.
There are a number of Accordion projects on Cocoa Controls and Cocoapods.
This is just using a UITableView and customising what happens when you tap cells.
You don't need UIKit Dynamics for something like this. Nor would I put multiple UIViews on top of each other as if there are more than a handful you'll run into memory issues.
The transition to the next screen is a custom transition. You can read more about these in WWDC 2013 video. I think it's session 218.
Or possibly in the tech talk videos available from the http://developer.apple.com website.
The iOS weather app uses a similar concept. I'm about 30% through trying to reverse engineer it. I believe it uses a UICollectionView with a layout-to-layout transition.
This is not a standard view controller layout. I think you could call this "Stacked View Controllers", as it is not per se a navigation controller (no push/pop), nor a tab bar controller, nor anything known.

Composing user interfaces without nesting viewcontrollers

I am pretty new to IOS but have completed a couple of simple apps.
I have read a number of books, which have helped me getting started, but I am missing som more generel advice on how to best structure an app - especially with regards to UI.
I know this is a very general question, so I will try to put up a specific problem. Suggestions on how to structure this particular app .. or pointers on good reads regarding similar topics would be highly appreciated.
Now the UI of this particular iPad App will look as follows:
The main screen is divided horisontally in two.
Upper two thirds is a sort of canvas / work space
Lower third is a toolbox with various items, which can be dragged to the work space.
The toolbox has different views which holds items in various categories. Lets say: One view with various geometric figures and one wiew with various colors. The user can choose which category to show in the toolbox.
Finally at the top of the screen is a toolbar with a single button.
I am a bit confused as to how to structure my views / ViewControllers. Maybe a lot of my trouble stems from me not fully understanding Apples guideline as to how to use various UI Elements - please feel free to say so if this is the case.
This is how I would start out.
I would construct a main ViewController controlling a main view. The main view would hold the upper toolbar. To this view I would add two subviews. One for the work space and one for the toolbox. The toolbox view confuses me a bit. My idea is making this a tabbed view with one tab for each category of items. However as I understand it, it is bound to cause lots of trouble nesting viewcontrollers which would be the case. Does this imply that using a tabviewcontroller to control only part of the screen is against guidelines? Would it be much better to make up my own 'tabbar' and simply switch between subviews when a tab is tabbed?
Does this also imply, that having a popup view, covering only part of the screen, with a navigationcontroller is equally bad practice? Or would this have to be a modal view? And how about a tableviewcontroller with a view taking up only part of the screen? I fail to see how to accomplish these things without effectively nesting viewcontrollers.
I am sure I got something completely upside down?
Best regards
Thomas
Nesting ViewControllers is not a problem. In fact, View Controller Containment was introduced in iOS 5 to make this even easier. However, it was still possible before the new containment functions.
The easiest way to nest two ViewControllers is the following:
SubViewController *theSubView = [[SubViewController alloc] init];
[self.view addSubview:theSubView.view];
The subview will then be controlled by the SubViewController and will be "nested" in the main ViewController. (This code would be part of the main ViewController.)
To use the new(er) View Controller Containment methods you will make the SubViewController a childViewController of the main ViewController.
There is an excellent video from WWDC 2011 that goes over View Controller Containment. You will need to be a developer to access it here. It is called "Implementing UIViewController Containment."
I would not advise to use the TabBarController in a nested format, it would be easier for you to just build your own view switching method or even use a UIScrollView with pagingEnabled.
As far as popup views with NavigationControllers, this is a common practice. There is nothing wrong with creating a popup with a NavigationController inside of it for doing something like, accessing app settings, or configuring a tool from you palette, or accessing saved projects, whatever you can imagine.
I hope this gets you off to a good start.

iPad app designing

I need to create an app for ipad.Its something like the contacts app in ipad.(like an open book)
My doubts are whether they are using split view or two different views.
If splitview is used,how could we increase its width and style?
You can tell that they are not using a split view controller by turning the screen vertically: split view moves the master into a popover; contacts simply rotates, without popping the master portion out. I think that they use a single, highly customized, view for the contacts.
The background can be just a chunk of graphic or a picture. On top of that you'd add your own or Apples UI elements.
Each functional area should probably be implemented as a separate subview, ie. the UITableView on the left, the index on the right and so forth.
In your words - implement it as separate views not a split view.
If you want something like that (don't know why you would... the Contacts app is horrible) then you're going to look past the default set of UI elements provided to you by Apple.
UIViewController, UITableView are really the only two things you'd be reusing for something like that.

Resources