ios6

iOS 6, Xcode 4.5 video not exiting when done playing

自古美人都是妖i 提交于 2019-12-06 10:49:02
I am using this code to play a video on iOS 6: -(void)GrommeVideo4 { NSURL *url5 = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Flickers" ofType:@"mp4"]]; grommePlayer4 = [[MPMoviePlayerController alloc] initWithContentURL:url5]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerWillExitFullscreen:) name:MPMoviePlayerWillExitFullscreenNotification object:nil]; grommePlayer4

Present Modal View in iOS 6

北城余情 提交于 2019-12-06 10:44:29
问题 I want to display a modal view but I have two problems: There is no presentModalViewController in iOS 6 and I have to use presentViewController which is just display my second ViewController like a modal segue not a modal window without full screen option, My second problem is how can I show the modal window from UICollectionViewController. I tried to use presentViewController but it just works with ViewController not CollectionViewController. The best example of what I want to do is this

iOS6/7 stop sound going to background using web audio API

不想你离开。 提交于 2019-12-06 10:37:35
There are different solutions for the issue when you go to the background in the iPhone or iPad and the sound continuous playing, the most of them for the HMTL5 audio tag , but are not relevant if you are using Web Audio API because there are not an event like "timeupdate" and is a different concept of course. The Page Visibility API works in iOS7 only if you change of tab, but doesn't if you go to the background, in iOS6 not at all. Someone knows any way to stop/mute a sound using Web Audio API if you go to the background in iOS6 or iOS7? To detect when safari is going background, you can use

replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: broken in iOS 6?

Deadly 提交于 2019-12-06 10:11:53
I cannot get the NSFileManager method replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: to work in iOS 6. Apps that call this method and worked fine on iOS 5 have major issues on iOS 6. The problem does not occur on devices running versions of iOS below 6.0. The problem does not occur if the app is launched in the iOS Simulator by Xcode. Otherwise the problem seems to be universal. Here is the test code I am trying to execute: NSError *error; NSFileManager *fileManager = [NSFileManager defaultManager]; NSString *documentsDirectory =

Use previous versions of Xcode to build on unsupported versions of iOS

和自甴很熟 提交于 2019-12-06 09:40:32
I have been frustrated that I have had to use the very buggy XCode 4.5 to build to my device after having upgraded to iOS 6 . Unfortunately, this version of Xcode for some reason does not allow my app to push or pop view controllers... an issue that completely goes away when I switch back to XCode 4.3.2. I wanted to be able to use XCode 4.3.2 to build to my iOS 6 device, but this is officially not supported in 4.3.2 because it does not support anything greater than 5.x. Is there a workaround or fix for this? Here is a fix for the issue: 1) When you install the latest developer release of XCode

Set accessibilityIdentifier on custom table section header view for UIAutomation

谁都会走 提交于 2019-12-06 09:19:20
How does one set an accessibility identifier on a custom section header view in a UITableView? For background, since logging the element tree of a table view inside UIAutomation produces a flat list of table cells (UIATableCell instances) intermingled with table group elements (UIATableGroup), being able to identify groups makes it easier to identify the cells that belong to those groups (since they are returned in order). If I set an accessibilityIdentifier explicitly on a custom view that gets returned as a section header view, I can confirm that the accessibilityIdentifier property is

Backspace functionality in iOS 6 & iOS 5 for UITextfield with 'secure' attribute

☆樱花仙子☆ 提交于 2019-12-06 09:19:02
问题 I have a UITextfield for entering password with SECURE attribute enabled. When the user taps outside the UITextfield after inputting a certain number of characters, and then taps back again to the UITextfield for editing, the following behavior is taking place: iOS 5.1 -When I try to delete a character(using backspace from keyboard) from the UITextfield , the last character is deleted. iOS 6.0 -When I try to delete a character from the UITextfield , all typed characters are getting deleted.

iOS6 NSDateFormatter default year

守給你的承諾、 提交于 2019-12-06 09:07:43
问题 Has anyone noticed that iOS6 NSDateFormatter defaults to year 2000 when no year is given while in iOS6: [[NSDateFormatter alloc] init] dateFromString: @"7:30am"] => 2000 Jan 1st, 7:30am iOS5: => 1970 Jan 1st, 7:30am Question: 1. Is there a better way to compare two different times? I have this subway app PATH Schedule/Map. The subway times are hardcoded in the database as numSecondsSince1970. I give people the next train arriving by comparing departure times with the current

How to replace buttons on a toolbar under UIWebView keyboard on iOS 6?

霸气de小男生 提交于 2019-12-06 08:36:58
How to replace buttons on a toolbar under UIWebView keyboard on iOS 6? The following code works fine on iOS 5.1 but doesn't work on iOS 6: UIWindow *keyboardWindow = nil; for (UIWindow *testWindow in [[UIApplication sharedApplication] windows]) { if (![[testWindow class] isEqual:[UIWindow class]]) { keyboardWindow = testWindow; break; } } for (UIView *possibleFormView in [keyboardWindow subviews]) { // iOS 5 sticks the UIWebFormView inside a UIPeripheralHostView. if ([[possibleFormView description] rangeOfString:@"UIPeripheralHostView"].location != NSNotFound) { for (UIView

Facebook sharing with SLComposeViewController: Prevent completion handler when no internet is available

梦想与她 提交于 2019-12-06 08:24:02
问题 I have implemented Facebook sharing in my app (iOS6) and the code is as follows. //Completion Handler SLComposeViewControllerCompletionHandler __block completionHandler = ^(SLComposeViewControllerResult result) { UIAlertView *alert = nil; switch(result) { case SLComposeViewControllerResultCancelled: { alert = [UIAlertView alloc]initWithTitle:@"Cancelled" message:@"Your message wasn't shared" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; [alert show]; } break; case