Slide out UIViewController on IOS [duplicate] - ios

This question already has answers here:
iOS horizontal SlideView with vertical menu
(5 answers)
Closed 9 years ago.
How do you make a viewcontroller that slides out and takes up part of the screen such as ones which may be seen on popular apps like Facebook, Rdio and Tinder? So you do a side swipe and a viewController will slide out and take up approximately three quarters of the screen and may have a tableView within it? Also, would this design be made using storyboard or interface builder?

What i used in my project was MMDrawerController (Mutual Mobile Drawer Controller)
https://github.com/mutualmobile/MMDrawerController
it provides full control and variety of effects, transitions, guestures. also you can slide the panel from either left or right side.

There are a very large amount of frameworks that do this. The two most popular ones are JASidePanels (which I personally use) and ECSSlidingViewController. You could also implement it yourself, but this will be more complicated. A place to start is to have a "bottom view controller" that loads and manages the other view controllers, or at least manages their views. If you have the patience, this route is obviously preferable as you can then really control the behavior of your app. That being said, these are great starts.
In these examples they use a combination of both programmatic management of view controllers, and the story board. It really depends on how you want to manage it personally. I personally like to "paint" my view controller basics in the story board and instantiate them using their storyboard IDs in order to give myself a good idea of what is going on visually.

You should Tate a look at ViewDeck. Just download it and take a look at it it's higly customazible and it's Identical to the facebook app

Related

Xcode 9 Swift 4 Tabbed Page

I know how to use tabBarController.
But I dont Know How to Create A Tabbed Page Like The Attached Image.
Whats The Name Of This Type Of Tab?
This is not any type of Tab. You can use a collectionView or a stackView for "Tabs" and a UIPageViewController for changing viewControllers.
You can check CocoaControls for similar controls, download source code and check their construction. You can possible do it with SegmentedControls (Or Custom UIViews for single Tab and draw in ScrollView) and UIScrollView as Content View (with Pagination On) as well, but it depends how much customisation is needed.
Trust me, it's REALLY tricky to obtain what you want with the iOS components. There are a lot of details that you will miss.
When I tried myself to build the same thing, it was like "ok I think I am reinventing the wheel, is not straight forward as I though, it require a lot of work"
You know you have to consider a lot of stuff like an User that start to scroll as a crazy between the pages and then tap on one tab bar button, and so on. Trust me, it's easy to have a working implementation, but it's really really difficult to obtain a PERFECT implementation
I decided to go for a library
https://github.com/aokizen/SPSlideTabBarController
https://github.com/xmartlabs/XLPagerTabStrip
but there are others that are all good to achieve what you want
Anyway if you want to go for your personal implementation I suggest a Segmented Control in the upper side and a PageViewController (maybe inside a Container View)

How to make an iOS Side Navigation Drawer like the one in Gmail

I have checked out several libraries, videos and online blogs on how to make a side navigation drawer in iOS, but none of them have been able to provide a simple solution to create a side navigation drawer where you are not limited to just a TableView. I want to be able to add different UIViews to the side drawer. This is the kind of Side Drawer I am trying to create :
Screenshot
Most of the libraries cant allow custom views inside the side drawer, but I want to create a small view like this at the top of the drawer UITableView.
So far, I have tried these libraries but each of them lack an essential feature :
https://github.com/mutualmobile/MMDrawerController : Only supports a list of items(basically only a tableview) and not custom views like the one I want to add and like the one gmail has, which displays the profile picture along with the email id.
https://github.com/jonkykong/SideMenu : Same Reason.
https://github.com/handsomecode/InteractiveSideMenu : Animation is too fancy.
https://github.com/evnaz/ENSwiftSideMenu : Only supports a TableView in the side drawer.
After having developed a few android applications, I was quite surprised that iOS didn't have an equivalent of the android DrawerLayout, and when I searched for libraries I could not find a single one that had the right classic design that is most used. I read somewhere that adding a side drawer was a bad design choice, but in my application, I have already used all of my screen space and need a way to give the user quick access to 20-25 list options along with a small view at the top. I figured adding a side drawer was the perfect way to do so, but unfortunately I haven't gotten very far trying to make it.
All help will be appreciated!
SlideMenuControllerSwift will let you stick any viewController with any layout you want into your menu. Its really not that hard to make your own slide out either. Your options are: 1. You make a container and every view in the app goes int he container along with the menu and the container animates the menu in an out. Or 2. You just make a menu singleton and when it gets triggered it adds its view on top of the main window, which will cover the current view controller.
You can try this one also, NavigationDrawer

Storyboard of a mockup

I am working on an e-commerce based app, and the designer has passed on the mockup to me. !
This is the mockup the designer has passed.
I am working on storyboard of this mockup and I have managed to get to this level as of now.
There are several views and features which cannot be included in this storyboard now because of the limited space. I know the designer has passed on me the rendered view, which can be seen on scrolling the app.
I wonder which could be the best approach to include all these views in a single storyboard or render them in a single view.
I have looked onto using xib files and calling them from my viewcontroller class, which could be a possible solution. But, I want to know, what could be the best solution?
Best solution is use Storyboard so that you have all screens at one place. But keep one thing in mind that start doing the whole project in XCODE 8 storyboard (Because XCODE 7 and 8 storyboards are not fully compatible with each other). So that you get compatibility with previous iOS versions also (< iOS 10)
Now as far as design is concerned, I would like to suggest you use autolayouts and proportional layout.
your View controller will always have self.view. Start on that view. First add navigation controller (with root view controller as your first prefered view controller on app start) or simply add one toolbar. Then add one UIScrollView to whole remaining space. Then start with your design inside UIScrollView. Don't forget to provide contentSize of UIScrollView.
For any help, feel free to ask.
The best solution would be using a tableView with multiple prototype cells for this kind of problem. Well, going through the concept as mentioned, I could easily scroll in the storyboard and maintain my design as per the mockup.

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

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.

Resources