ipad

Memory leak with a lot of big images in iPad

时间秒杀一切 提交于 2020-01-14 03:26:09
问题 I'm trying to store UIImage datas in NSArray , actually 60 images, each with size of 300kb. Then, I'm trying to animate that images in UIImageView . My code: NSMutableArray *arr = [[NSMutableArray alloc] init]; for (int i=0; i<61; ++i) { [arr addObject:[UIImage imageNamed:[NSString stringWithFormat:@"%i.png", i]]]; } img.animationImages = arr; img.animationDuration = 1.5; img.contentMode = UIViewContentModeBottomLeft; [img startAnimating]; When I test it in iPad Simulator 4.3, it works fine.

Empty space of 1 pixel above UINavigationBar

谁说胖子不能爱 提交于 2020-01-14 03:23:07
问题 In the landscape orientation I can "see through" one pixel of the view behind (the split view controller, visible between the status bar and the navigation bar): I rechecked the width, the height and the autoresize parameters of the top-most view with the navigation bar, however I cannot understand where does the gap come from. 来源: https://stackoverflow.com/questions/7818982/empty-space-of-1-pixel-above-uinavigationbar

Keeping a jQuery modal within an iPad viewport

偶尔善良 提交于 2020-01-14 03:20:08
问题 I've written a fairly stright forward jQuery modal as I didn't want anything to heavy. The modal works fine on all browsers apart from the iPad. If I am at the bottom of the page and click to open the lightbox it will open at the top of the page out of view. I'm not using jQuery to position the window just pure css can anyone see why this would work in all other browsers apart from the iPad? #lightbox { position:fixed; /* keeps the lightbox window in the current viewport */ top:0; left:0;

How do I center the contents of a webview in iOS vertically and horizontally?

社会主义新天地 提交于 2020-01-13 13:29:29
问题 I have googled quite a bit and I can't seem to find anything that makes sense to me. I need to center the contents of a webview both vertically and horizontally. I have been able to get the horizontal to work with this: - (void)webViewDidFinishLoad:(UIWebView *)webView { NSString *bodyStyle = @"document.getElementsByTagName('body')[0].style.textAlign = 'center';"; [self.webView stringByEvaluatingJavaScriptFromString:bodyStyle]; } But I can't find anything on vertical. Any ideas? Any help

iOS: MPMusicPlayerControllerPlaybackStateDidChangeNotification called multiple times on certain devices

℡╲_俬逩灬. 提交于 2020-01-13 12:08:12
问题 I have an application that plays back music. I'm using the following code to listen to playback state changes from the MPMusicPlayerController to update the UI. More precisely I toggle the look of the play button between play and pause. NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; [notificationCenter addObserver: self selector: @selector (handle_NowPlayingItemChanged:) name: MPMusicPlayerControllerNowPlayingItemDidChangeNotification object: self.musicPlayer

iOS: MPMusicPlayerControllerPlaybackStateDidChangeNotification called multiple times on certain devices

徘徊边缘 提交于 2020-01-13 12:08:09
问题 I have an application that plays back music. I'm using the following code to listen to playback state changes from the MPMusicPlayerController to update the UI. More precisely I toggle the look of the play button between play and pause. NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; [notificationCenter addObserver: self selector: @selector (handle_NowPlayingItemChanged:) name: MPMusicPlayerControllerNowPlayingItemDidChangeNotification object: self.musicPlayer

Set UIPopOverController size

拜拜、爱过 提交于 2020-01-13 10:43:34
问题 I have a view with a bunch of button in a UIScrollView . When the user presses a button, I want a UIPopOverController to display pointing at the selected button. It kind of works, but the popover is the wrong size and points to a random point in the view. Here is my code. -(void)detail:(id)sender{ UIButton *button = sender; NSLog(@"tag = %i", button.tag); UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController]; if (UI_USER_INTERFACE

Set UIPopOverController size

时间秒杀一切 提交于 2020-01-13 10:43:16
问题 I have a view with a bunch of button in a UIScrollView . When the user presses a button, I want a UIPopOverController to display pointing at the selected button. It kind of works, but the popover is the wrong size and points to a random point in the view. Here is my code. -(void)detail:(id)sender{ UIButton *button = sender; NSLog(@"tag = %i", button.tag); UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController]; if (UI_USER_INTERFACE

What is the exact size of UIModalPresentationFormSheet in iPad

泪湿孤枕 提交于 2020-01-13 08:53:23
问题 I am using following code for displaying a Screen/View Controller. SearchParams *nxt=[[SearchParams alloc] initWithNibName:@"SearchParams" bundle:nil]; UINavigationController *nvc=[[UINavigationController alloc] initWithRootViewController:nxt]; nvc.modalPresentationStyle=UIModalPresentationFormSheet; [self.preLCtr.preCinescape_iPadViewController presentModalViewController:nvc animated:YES]; I am not sure about the size of PesentationSheet. I tried to take screenshots & take dimentions/size.

Universal iPad App rejected because of launch crash that I can't reproduce

怎甘沉沦 提交于 2020-01-13 08:04:53
问题 I'm very frustrated with this problem. After one week of waiting my universal iPad app has been rejected because "is crashing on launch on iPad running iPhone OS 3.2 and iPhone 3GS running iPhone OS 3.1.3 and Mac OS X 10.6.2." Unfortunately I can't replicate the problem, I've tested in debug and release modes and the app works just fine. I even created an ad-hoc configuration and test it in other devices and everything works fine. I should clarify that this is an update to a current iPhone