I was having troubles showing a simple MPMoviePlayerViewController… digging into stackoverflow everything pointed me to an issue of iOS 6 about rotations, and viewWillAppear/viewWillDisappear methods that are called from the root view controller.
What it actually was… was much more simpler than all this (now… after 2 hours of research..), this stackoverflow answer pointed me to the correct solution
I was using
[[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:path]];
[[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:path]];
This is how it should look like
NSString *path = [[NSBundle mainBundle] bundlePath];
path = [path stringByAppendingPathComponent:@"test.mp4"];
self.moviePlayerViewcontroller = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:path]];
Worst thing… the error messages: NOTHING AT ALL
Imagine you have a repeating animation created with the UIView block animation method and you want to stop.
So your creation looks like this:
[UIView animateWithDuration:2.0 delay:0.0
You can just stop this animation by commiting a fast animation to the final value you want to have, in my case alpha 0
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve: UIViewAnimationCurveLinear];
source that didn’t work for me, as first guess because I am using an UIImageView:
Quick post to not forget!
To generate these images, you should start with your raw resource in vector format and generate the images for each density using the following size scale:
– xhdpi: 2.0
– hdpi: 1.5
– mdpi: 1.0 (baseline)
– ldpi: 0.75