local animations in Objective-C - ios

I've been looking through a few applications for inspiration and see many image based animations, for logos or text etc. However, some of these animations don't appear to be possible in objective-c or at least from my knowledge. So I've been looking to get my own created. However, I've read that you cannot run .swf in objective-c. So, what are my options for animation files that I can run? If I go to a freelancer and request an animation. What type of animation do I need to be asking for?
This could be for a simple logo animation on the application launch, or could be for an event in the game. I.e, a cutscene.
Question
What animation files would best suit my needs and/or is it possible to run it locally? I don't want to be including html. A simple file, launched create the animation. Like a .gif.

Related

How to make my LaunchImage load at the same time as the application?

As the application loads, I want to make an image load at the same time, for example, a line would elongate form either side as the application loads, and when it has finished, the line would have reached its maximum length. I have seen this in a few websites, like rime arodaky for example, but I want to this for an iOS application. I have searched on Google but couldn't find anything!
Does anyone know how to do this?
The launch process if we REALY simplify it to accommodate your question, can be split into two parts.
The first part you do not have any control over, and during which a launch image is shown.and it ends with a delegate call-back on the application delegate called
applicationDidFinishLaunchingWithOptions
The second part is you might have some application specific behaviour which requires no activity from the user but you app still isn't interactive.
You need to implement such a progress bar yourself. There is no built in support for this in any of the app templates in Xcode.
You can only do what you want during this second phase. But you have absolutely no control over the first phase, except for that static non-animated launch image.
I think you can just add a photo as a launch image, launch image is just an image.Then you can add the animation when your first view controller appears.You can fake it this way.

iOS programmatically capture image

This is more of a theoretical question. I'm fairly new to iOS programming so haven't nailed fully the terms to use in scenarios like this. I've been asked to create an application where I need to fire an event to capture an image programmatically. The application will be in the foreground, and will have the requisite permissions to use the camera. I've been unlucky with my searches so far - likely because I haven't termed them correctly.
My question is this; Given an application with a camera view, set up to capture images - is it possible for me to fire an event within said app to capture the image, without a button necessarily being pressed? If so, how would I go about finding documentation to guide me through?
In an ideal world, I'm hoping for something as simple as cameraObject.capture() or something of that ilk - but an ideal world is a rarity!
Thanks in advance!

How to make a slider volume controller on iOS? Objective-C, iOS 7 (or 8), xcode 5 (or 6)

I am learning to develop iphone apps and I have a simple question.
I am making a really simple app which allows the user to set the volume of the device on the settings screen using a slider instead of the volume buttons.
It may be quite obvious for experienced developers but I just can't find the answer I am looking for.
My question is:
How can I make this slider?
Basically I want to do this (image: https://www.dropbox.com/s/b81bzdwyrab0ha7/slider.png?dl=0):
I used to think that I could use a regular UISlider but some documentation says that I need to use something called a MPVolumeView. The problem is that I can´t find a good tutorial that tells how to use this explicity.
I found this link on the apple documentation but I dont understand how this works. – http://developer.apple.com/iphone/library/documentation/MediaPlayer/Reference/MPVolumeView_Class/Reference/Reference.html
And the description says: Use a volume view to present the user with a slider control for setting the system audio output volume, and a button for choosing the audio output route. When first displayed, the slider’s position reflects the current system audio output volume. As the user drags the slider, the changes update the volume. If the user presses the device volume buttons while sound is playing, the slider moves to reflect the new volume.
This is exactly what I want but I dont understand the example it gives. If you could please tell me how t make this slider work, even if it is on a new one-view project, I would really appreciate it.
Also I am aware that this method also creates an airPlay button next to the volume slider. Is there a way to delete this button? (My app is a simple productivity app so I only want the slider, not the airplay button).
I also understand that this will not work on the simulator. How am I supposed to know that this will work without having to test it on an actual device (I am not registered as a developer yet)?
Plus, I only know objective-c, not swift. If you could please restrain from using swift in your answers I would apreaciate.
Thank you so much for your help.
PD: English is not my first language. Sorry for any mistakes I made.
The MPVolumeView class is designed to let you do exactly this. It's in MediaPlayer.framework, so add that to your app to make things build correctly.
You create it and make it visible the way you instantiate any other subclass of UIView, which you probably know by now.
You disable the routing button by setting the "showsRoutingButton" property to false.
"How am I supposed to know that this will work without having to test it on an actual device?"
By seeing that it's been there since iOS 2.0, and is used in countless apps?
The process to writing such a slider is incredibly simple, look into UISlider(https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISlider_Class/) and then use the float value from the slider to set the volume.
If you do not want to write your own slider, look on GitHub(github.com) for controls that do this for you. After doing a quick search, I found this UISlidersubclass that adjusts volume.

Build a "grouping" animation like Apple's iPad mail app

How can I do this "grouping" animation like Apple mail or the Gmail iPad app?
Does this need to be hard coded, and completely done with the animation framework, or does Apple expose an API for this to be done. I checked the developer docs, and I don't see anything like this. But Gmail was able to exactly replicate Apple's animation, and that's why I am curious to know if it can be done in an easier way.
I am 95% sure Apple does not have a UIStackOfPaperViewController or anything like that. You would have to code this up yourself.
Conceptually, it isn't too complicated: a background view with a texture, and each subview tilted at a random angle and a drop shadow beneath. You could do the drop shadow by drawing a gradient in a view around the "real" view. Core Animation's default behaviors would probably do the right thing, e.g. if you create the page view off screen and then set the final location, it will fly onto the stack pretty much how you would like it.
If you don't need support for releases earlier than iOS 6, there's probably good stuff in the Collection View Controller to make this easier.
Hopefully that's enough information to get you started, but your question is really broad. It's difficult to answer "How do I do X?" if you don't specify your starting point, or answer "How can I do this in an easier way?" if you don't specify what you think the hard way is first.

iOS: Can the UIImagePickerController Default UI be modified?

I am working with a small camera app for a client and I have now finished all functionality of it. In the standard camera controls i need to modify one thing , the cancel button should say gallery instead.
But unless i am missing something i will need to remove the overlay by setting showsCameraControls to NO and then building my entire overlayView from scratch.
I have found this solution but I am afraid to go this route due to the warning in the beginning of the post.
So is there any valid way of doing simple small modifications to the existing camera overlay control UI or do you have to build it from scratch if you need to change one tiiiiiiny thing?
Unfortunately, having been in this situation I can safely say you need to build the controls from scratch. You really only have two options: create your own camera overlay, or use the default one.
Now, you could use the techniques described in the link you cite, and iterate through the various subviews and modify them 'blind'. The rather large danger with this is every time Apple change the internal structure of the image picker it could potentially break your solution. So I'd definitely stay clear of it.

Resources