Pager Sliding TabStrip in ios - ios

I would like to use Pager Sliding TabStrip in my project.Pager Sliding Tapstrip is there for android. Can we define like this? I have taken one scroll view, added subviews on it for tables and take one uivew, added buttons as subviews and added uilabel as subview for tabstrip . While using the scrollview means dragging the scrollview, the tabsrip has to be moved.I have been stuck to this concept and i am not getting any idea to solve this issue. How do i get this concept? Please give any idea to me anyone.

Can't you use UIPageControl for this ?
From Apple example:
https://developer.apple.com/library/ios/samplecode/PageControl/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007795
And to have a custom UIPageControl, like this https://github.com/Spaceman-Labs/SMPageControl .

You can try UIPageViewController to manage your tabs.
I'm not sure how many tabs do you have. If you have many tabs and you add all tables into the scrollView at the beginning time, the performance and memory usage would be really bad.
So you'd better reuse controller and views for your tabs. If you use UIScrollView and manage them by yourself, what you can do is calculate current page according to the contentOffset, and load the current page, previous page and next page. Because three pages is enough to cover what user will see. However the better solution is using UIPageViewController, it will deal with contentOffset and pagination, what your need to do is just provide previous controller and next controller according to current controller. Then update your tab view according to current controller.
EDIT:
BTW, if by "the tabstrip has to be moved" you mean when you drag the scrollView, your tabstrip moves as well, that's because you added your tabstrip to the scrollView. What you need to do is add it to the root view, and the scrollView and the tabstrip should be siblings rather than parent and child.

I am developing application which required same features as asked by you.
I am using SHViewPageController. You can find it from following link.
https://www.cocoacontrols.com/controls/shviewpagerexample
I hope it will help you. Thanks.

This may help you....
you can change the tab at top or bottom. also it has got some nice customizations
https://github.com/iltercengiz/ICViewPager

Related

How to make Interface in iOS

I have a page which I have to create in iOS. Below I have uploaded the screen shots of one page. How can I create this page. please suggest to some links or some ideas to create this interface.
This tutorial is what helped me. It's quite a lot to type out in an answer here. The big trick is adding a content view inside the scroll view and adding all your content to that content view
http://spin.atomicobject.com/2014/03/05/uiscrollview-autolayout-ios/
I am not vary experienced with using the UIScrollView but I think this is how you do it:
Search for the scroll view the Object Library and place it on you storyboard, then re-size it to your needs. (I am assuming you are using interface builder)
I am probably missing something here though.
If you already have a view that you would like to embed in a UIScrollView, go to "Editor" and select "Embed in scroll view":
I would use a UITableView here. UITableView is a subclass of UIScrollView. You can use the UITableViewCell's to break up the different components in your view.

How do I create a horizontal scroll view with unlimited pages?

I am trying to make an app that you can scroll through and it displays a different string on each page. I though I should use scroll views as they seem to be how I can do this. An example of what I want is UberFacts app. This app you can scroll along and it has a different fact each time. This is obviously not just thousands of different view controllers that are linked by the page control. How do I make view controllers work like UberFacts?
Thanks!
UberFacts seem to use a paginated ScrollView and each page looks like a vertical ScrollView also (you can see by the bounce). But is just one ViewController that manage all those pages.

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

iOS 7 Weather app expand/collapse transition

I'm trying to achieve a view transition like the new iOS7 weather app transition, using a collapsing/expanding view.
Does anyone know if a lib already exist for that ?
Thanks
User antol put some effort into replicating the behavior:
https://github.com/Antol/APPaginalTableView
But note that APPaginalTableView doesn't have a separate controller for the expanded pages.
You can see it in action here:
https://www.youtube.com/watch?v=X1YvxDMr0yA
EDIT
Check out this project. It demonstrates how to do the first part of the Weather app's transition using normal View Controllers and the transitioning API.
I know this is a little late for a follow up, but I've looked for a library to do this, as well, but haven't found one.
https://github.com/chefnobody/Colors
I was able to do this using the new UIViewController Transitioning API. This example should get you started:
http://www.teehanlax.com/blog/custom-uiviewcontroller-transitions/
To augment this example to get the pinch/pull table view cell separation animation you would need to identify the table view cell that was selected (or "selected" relative to the pinch gesture"), then in -animateTransition: you would animate the cells above and below the selected cell out of view, revealing your details view controller.
An alternative to APPaginalTableView if you are looking to use the storyboard more and set subview controllers to the table. I was working on the same problem and this is my "playground" for it. https://github.com/nissaba/customcellTest.git

iOS: How to get swipe effect between views of tabbed view controller?

I keep seeing apps that appear to be tabbed view controller apps, where the user can easily swipe left or right between views.
How do I enable that kind of behavior?
Thanks.
The best and least hassle free solution I found is Andrey Tarantsov's ATPagingViev class. Works just like a UITableView, i.e. how many pages do you want, scroll horiz or vert. provide view for page, etc. Very easy and well coded. It's here: SoloComponents
It also has a recycling feature so it's memory stable.
If you refer to something like Apples photo app, it is using UIScrollView which has a property to enable paging.
If you define the views content width wider than your view's frame, you'll get the effect you describe. The view will page in steps of it's bounds width.
On each page you can place another view.
http://developer.apple.com/library/ios/DOCUMENTATION/UIKit/Reference/UIScrollView_Class/Reference/UIScrollView.html
Another option I found is SwipeView:
https://github.com/nicklockwood/SwipeView

Resources