How to implement a static menu bar in an UIPageviewcontroller? - swift

im trying to build in a static menu bar in my uipageviewcontroller like youtube has. Does anyone know how to implement it ?

What are you asking for is not part of the iOS SDK. As you will see the more you program, there is not point in hacking the SDK here and there to make visual elements look and behave the way you want. You're better off creating custom views in NIBs (or in code if so your heart desires), plugging the behavior you want into them, and use that instead of the SDK.
If you do want to use a UIPageViewController, here is a tutorial you can refer to for inspiration. The UISegmentControl can easily be replaced bya view of your own. Good luck!
EDIT: I realized I forgot how to include the link. Here you go: Switching controllers with a UISegmentedControl

Related

Replicate Instagram Search-Style Swiping Tabs

I'm trying out some new things in swift. However, i'm fairly inexperienced so please bear with me if I use wrong terminology.
I'm looking to replicate Instagram's search view, as shown here:
the animation to the next table is shown here:
http://i.imgur.com/XUxG31w.jpg
I'd appreciate any help y'all can offer on how to replicate this. Thanks.
This is a custom view that is not available by default in UIKit. However, it can be built by creating your own custom views.
You can use a UIScrollView with isPagingEnabled set to true. To implement the other features, you can use the scrollViewDidScroll method on UIScrollViewDelegate and the setContentOffset method to manipulate the scroll position in code.
Alternatively, there are some libraries on GitHub (example: XLPagerTabStrip Library) which you can include in your app. The source code is available so you can see how they implemented their views to build your own.

How to implement Spotify-like iOS app sidebar feature

I've already implemented a sidebar like that in Facebook/Path apps with ECSlidingViewController but I've noticed that Spotify app it's a bit different and has a very slick effect. The sidebar is not already full visible but it slides and show the icons as more as you swipe with your finger. How to animate the sidebar in this way?
Here an image for a better explanation.
Take a look at MMDrawerController https://github.com/mutualmobile/MMDrawerController
It has nice sample app and allows custom sliding effects, including the one you are looking for
There are many such libraries available to implement the behaviour you have asked for. I would recommend ECSlidingViewController since its easy to use plus it supports StoryBoards:
ECSlidingViewController
As i said there are a lot of different libraries to implement the same thing. You can also check the link HERE that contains a whole list of similar libraries.

How can I use a UIPickerView in my settings.bundle like how the 'nike+ ipod' app does it?

I can't see how this is possible from the documentation but here nike is doing it in their app so there must be a way.
It's impossible unfortunately. Apple developed it for Nike, so they used tricks of their own to do it. It might actually be possible, but it's certainly undocumented if possible. Impossible for an App Store app. Let us know if you figure out a way to do it even if it's undocumented.
If you use the library InAppSettingsKit, you can have a setting that uses a custom subview (a custom UIViewController) to display the choice to the user. So all you have to do is to create a custom view controller that looks just the one in your picture (it's basically just a UITableView and a UIPickerView).
In the example app that comes along with InAppSettingsKit, there is an example on how to use a custom subview.

Changing views iphone

this is a very noobie question although I have had quite a bit of experience iphone development.
I have a client who wants an app with various screnns, but does not want to use built in iphone navigation, but instead wants to have buttons on the screens. All I can find is a load of 14 year olds giving tutorials on MVC or using different views in the same nib.
Does anybody know what apples suggested way of doing this is as I can imagine it been a mind field.
Many thanks
Maybe you should have followed the MVC tutorials of the 14 year old guys.
Then you would know that you could use the built in iphone navigation controllers (ie UITabBarController, UINavigationController) without their standard view counterparts (ie UITabBar, UINavigationBar).
You could always just draw buttons on the screen in interface builder and use custom images for the normal/highlighted states.
When the button is pressed it's up to you what you'd like to do with the received buttonclick method being invoked... the usual way is with the standard navigation system which can optionally have a navigation bar at the top with (back) button, title, etc... and you push/pop viewcontrollers in a hierarchical way. You can just turn the title (or change for your own style) but it does enforce a hierarchical structure.
If you don't want hierarchical navigation of your screens you can either do this with your own custom navigation controller than handles which viewcontroller is currently visible or you could use a thirdparty component like three60 which allows you to navigate around like a webbrowser does on webpages.
You may also want to take a look at Corona which is more for games but would allow you to do a totally custom interface with all sorts of custom transitions and just needs you to write lua... that said it will limit you on using their engine with this approach as you can't get to the ObjC level.
Finally one last approach is simply to use webview and pick up the clicked links so you design your app via webpages... rather ugly approach but can work well if you're very familiar with HTML.

navigate in iPhone app without programming

is it possible please to build small application with interface builder without coding, just to make sure that my interfaces are well organised ?
For the navigation interface, no. You need to programmatically push views into the navigation stack.
Interface Builder is a layout tool for individual screens. Connecting them in a navigation flow happens in code.
I second #fluchtpunkt's comment that you might want to look at publishing your content as an iBook rather than a native app. Or you could look at one of the html-to-native-app solutions like PhoneGap or Appcellerator. I've never worked with either of them, but theoretically if you have any HTML ability at all, they flatten out the learning curve of simple app building very significantly.
If you just want to test your interface you should probably use a mockup tool. I have good experience with blueprint. Or try something like interface (http://www.lesscode.co.nz/interface). Here you can create a GUI prototype and export it to XCode (maybe you can run the app at the simulator with navigation after this operation…) but i don’t know because i haven’t any experience this tool!