Make a Page Control like the iOS 7 Camera app - ios

I was curious as to how you would make the custom page control that Apple has implemented in their camera app, with the text essentially acting as the page control and moving along with the swipe.
Are they using a UI Element that has the text fade into the background like that?

If you mean the text on the bottom ("Video", "Photo", "Square", ...) there's no stock component for doing it.
If I had to implement it I'd try with a UICollectionView with a flow Layout. You can easily play with alphas and 3D transforms to achieve the same effect.
As a reference you may want to look at the WWDC 2012 talks about UICollectionView, in one of which (can't remember which one) they explain how to build a cover flow interface with using a flow layout.

Related

Blur then focus Effect

I am making a single view application in Xcode and I am having a little trouble*(By little I mean BIG trouble!)
I wanted to make a clone of the Apple's News app home page where the buttons are are blurry than come to focus.I want to use that effect for three different ui elements.I have been trying for days but no success. :(
Is there a way of doing the blur than focus animation to a label a button And image view? If so can you please guide me on how to do it?
Thank you for your time.

Hybrid application with iphone?

I want to create a simple game, and as I understand it OpenGL will make that happen but could I make the menu, high score list and every thing except the game with regular xcode?
For instance, for Windows Phone (where im comming from) you could create XAML/DirectX where you totally could make the menu in xaml/cs and then the game in directx
Yes, the main view element in iOS is called an UIView and you use it to present openGL content on it. This results in being able to overlay it with any other views, subviews, put it in a superview, have multiple views with openGL content... All the events such as touches work as well. In summery implementing openGL in iOS UIView will simply override the visual content of the view leaving rest of the functionality as it is.

iOS: Facebook chat heads behaviour and animations

This question is probably a little out of date, but I've been using the new Facebook for iOS with the "chat heads" feature (with the chat heads only present within the app), and was wondering how Facebook went about implementing this? E.g. How did they handle the drag animations for the chat heads, and also (when clicking on the chat head) how did they manage to overlay a UITableView on top of the "base" UIViews in the background?
Is this all part of UIKit, or did they create their own classes to handle this?
To answer #StuartM's question in the comments, in the last couple of months I've had a bit more experience with UIKit, and I think I have a rough idea on how I would implement something like this if I was going to do it.
What I would do is for the chat head, create a styled UIButton and add it as subview to the main Window. For the dragging, I would add a Gesture Recognizer to the UIButton to respond to the drags, and for the "snapping to edges" I would use iOS 7's new UIKit Dynamics (http://www.raywenderlich.com/50197/uikit-dynamics-tutorial).
As for showing the UITableView overlay with the chat history, I would use a Child View Controller (https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html#//apple_ref/doc/uid/TP40007457-CH18-SW6) and as for the popping open animation, I would just use the default UIView animations, maybe using animation transactions as I'm not sure I can do everything with just the implicit animations?
And I think that should be it. To be honest, I think anyone who has a handle on those frameworks should be able to build anything in their iOS apps, and if you were to create a "chat heads" like sample project in your spare time, should give you a pretty indepth knowledge of how those frameworks work.

iOS OpenTok - How to style the video views?

I am using the OpenTok iOS Framework to allow video chat within my app.
However, I am trying to find a way to custom style the views that display the user and connected user's streams.
From what I have found, it seems like these views are created in OTVideoView files, but I can only access the header.
Can anyone point me in the right direction on how to customize the views for the streams so I can make it look nicer than the default styling?
Hi, Each Subscriber.view of publisher.view is really a UIView object (Technical talk: OTVideoView is subclass of UIView). You can style them however you like by applying transforms and such to the view.
For example, to adjust width/height dynamically, you can do something like this:
[_publisher.view setFrame:CGRectMake(left, top, width, height)];
Anything you can do to UIView, you can do with OTVideoView.
Here's UIView's documentation: http://developer.apple.com/library/ios/#documentation/uikit/reference/uiview_class/uiview/uiview.html
Hope that helps,
Song
P.S. If you have time, check out this blog post about using Core Graphics with OpenTok's video streams to do some nifty image recognition!
http://www.tokbox.com/blog/fun-with-core-graphics-in-ios/

Required Windows Phone 7 page transition/ flipping card animation for iOS

I want to achieve the same kind of flipping card animation for iOS application which Windows Phone 7 has.
While navigating from one page to another, it loads one by one widget with fall down from left to right position.
How to achieve the same animation for iOS?
Here is the reference: http://www.youtube.com/watch?v=cVRT_KbYzHI
Please help out with some sample code posting or another provided link.
You can achieve animations such as this with UIView's animateWithDuration:delay:options:animations:completion: method. The documentation is here; search for the function name: http://developer.apple.com/library/ios/#documentation/uikit/reference/uiview_class/uiview/uiview.html
Basically you would need to place the views you want to animate inside a loop, incrementing the delay by x amount each time.

Resources