How to implement Spotify-like iOS app sidebar feature - iphone

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.

Related

How to implement a static menu bar in an UIPageviewcontroller?

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

How can I make a grid similar to iphone/ipads launcher screen?

I have seen a few grids made with UITableView but I don't really like how close together each cell is to the other. If there is a way of creating a grid system like the home screen on an iphone (the screen after it is unlocked) if would be great. I don't need an exact solution but a point in the right direction, maybe a set of libraries to look through would be great. I am running xcode 4.4.1
Thanks!
The key is UIScrollView has a paging mode (since could have more buttons than fit in the view). It's covered here's in Apple ocs:
http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/UIScrollView_pg/ScrollViewPagingMode/ScrollViewPagingMode.html
If you use that, each 'page' would have n buttons/views that when clicked would call a protocol/delegate call back for the consumer with the data to handle and it would evenly layout the UIView/buttons across that page view. Contact me if you want my sample.
You probably don't want to require iOS6 as a minimum requirement but if you do, you can do as H2CO3 suggested in the comment and us UICollectionview. Here's a tutorial: http://www.raywenderlich.com/22324/beginning-uicollectionview-in-ios-6-part-12
There's also some open source launchers that you can look into their code. Here's some (I'm sure there's more).
http://www.cocoacontrols.com/platforms/ios/controls/sespringboard
Code is at: https://github.com/sarperdag/SESpringBoard
Also: http://www.cocoacontrols.com/platforms/ios/controls/openspringboard
Use UICollectionView. You can create grid type views using that. It is available in iOS 6.
If you can target iOS 6+, use UICollectionView. It's one of the best new things in iOS for years and it will be as important as UITableView.
The layout you're asking for is only a few lines of code.
NSHipster has a good explanation of UICollectionViews and Ray Wenderlich has a good tutorial.
(There's lots of example code out there, but here's a very simple example project I did recently for another question involving UICollectionViews)

IOS new Facebook iPhone App UISplitViewController Layout [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
SplitView like Facebook app on iPhone
another break away .net developer here now trying to get used to the world of IOS.
I like the layout of the new Facebook iPhone app (October 2011), and want to implement something similar in an app I am doing. I know that the UISplitterControl is not available on iPhone but Facebook seem to have pulled a little magic to make it appear so on their new app.
In Facebook's implementation it looks to me that they have used a UINavigationController which slides to the right by x when the NavigationBar icon is tapped thus exposing a view underneath with the menu items.
Would appreciate if someone could help me work this out as the solution would also be a great learning curve.
I've tried setting a UINavigationController as the AppDelegate window root view controller, then using initwithframe to load a custom view which includes the menu items as a subview hidden behind the UINavigationcontroller root view. Then when the UINavgationController menu item button is clicked slide the NavigationController to the right thus exposing the view underneath with menu items.This presents two problems, first that the subview positioning doesn't work and also how can I slide the actual UINavigationController to the right to expose the menu view underneath.
Please help!
Might also want to check out my implementation on Github. It's specifically designed to resemble Facebook's implementation as much as possible (from a technical point of view). Also it leverages iOS 5's new UIViewController-Containment features, which most others don't. Thus it works flawlessly in both landscape and portrait modes. It's universal of course and highly flexible. One class only. The way you use it is similar to any other Apple made controller.
there is a similar post here: SplitView like Facebook app on iPhone.
you can also checkout the code directly at: https://github.com/mystcolor/JTRevealSidebarDemo
I'm having exactly the same question, my guess is that the "SplitView" is actually more likely a modal view that takes up only part of the screen. I haven't had the time to try it just yet but the following post might give some hint on how this can be done:
http://ramin.firoozye.com/2009/09/29/semi-modal-transparent-dialogs-on-the-iphone/
You might want to check out this project
https://github.com/aaronbrethorst/StackScrollView
Here some howto
http://cocoacontrols.com/posts/how-to-build-the-twitter-ipad-user-experience
Similar to the one "MyPad" is using.
Note: This is only for iPad but you might find some usefull stuff in it
I created a component that mimics the behavior of the Facebook slide out menu. It is available on github.
Here is link from stack overflow where people have discussed on same topic.
Also there are several links that can be helpful:
SplitView like Facebook app on iPhone

iPhone SDK - Expanding Buttons like in the camera app

I am curious as to whether or not there is an open source solution to replicate the flash button in the iOS camera applicaiton.
I have seem many other apps use this, but there doesn't seem to be a native way, so I assume there is a common source out there.
It is possible to get the flash button by using UIImagePickerController class, but most of the camera apps out there don't seem to be using this (or perhaps they subclass it, which is against apple's terms).
I am looking for a way to replicate the expanding behavior of the button. Any thoughts?
It doesn't sound too hard.
The way I'd do it is to separate the right curve of the button (as images), and make a UIView that has the left part of the button and the right curve as subviews.
When it's tapped, slide the right curve and animate the extra buttons in.
You could use a stretchable UIImage (see UIImage documentation) and then just animate the frame changing.
In the Apple 2010 WWDC Sample code (downloadable via iTunes, otherwise I'd post it here), there are several sample applications which use this control. They call the class ExpandyButton. I realize I'm answering my question, but hopefully someone out there can find this useful.
While looking for a similar solution to this problem I came across this code which was extremely helpful. Similar to ExpandyButton it fit my needs better.
https://github.com/ddebin/DDExpandableButton

iPhone option menus

What options do I have when creating menu with options (contextual menus). What is allowed and what does Apple provide?
I have a toolbar with buttons and a click of a button opens a menu with options:
Examples:
UIPopoverControllers are only available on iPads, but it's ok to create similar looking things for iPhone
What you see in the picture, is entirely custom. a UIView subclass likely. There are pretty much no limits to what you do with your UI, within reason, so no ugly highly contrasting primary/secondary colours, and it's best to keep it at least similar to the native UI. If you say use a windows 7 phone ui style in an iPhone app it's more likely to get rejected by Apple, than keeping to the style of iOS.
So make it look as "professional" as possible, using gradients and shadows, edge arrows, like in the above picture.
Apple provides pretty much nothing that your looking for,
Similar built-in widgets would be UIPopoverController (iPad-only) or UIActionSheet. I like your menu better though.
I would also recommend looking at the guidelines for such custom UI elements. I can not say what is 'allowed', but Apple is not shy about how your app should look/feel/function.
Towards the top of this link talks about toolbars, status bars, etc.
http://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW1