ios6

In IOS 6 on iPad, initial rotation is always portrait, after that it always rotates correctly

倾然丶 夕夏残阳落幕 提交于 2019-12-07 12:22:45
问题 In a shipping app that has worked correctly under iOS 5.X and supports all orientations, built against iOS 6 it always starts in portrait even when the ipad/simulator is in landscape). I did add the new rotation methods - (BOOL)shouldAutorotate NS_AVAILABLE_IOS(6_0); - (NSUInteger)supportedInterfaceOrientations NS_AVAILABLE_IOS(6_0); but that makes no difference. Note we do not use a navigation controller as the root view controller. Otherwise the app rotates correctly after the initial

UIView not autoresizing correctly iPhone 3.5 inch vs 4 inch screen

匆匆过客 提交于 2019-12-07 12:17:59
问题 I have a UINavigationController that has as its top UIViewController a UIViewController with a UITabBar on it. (It is not a UITabBarController b/c I am told that Apple does not want you to push a UITabBarController on a UINavigationController). The UITabBar controls 3 UIViewControllers. When I run it in the simulator, the 3 UIViewControllers work for the 3.5 inch screen, or the 4 inch screen depending on how I use the simulated metrics in Interface Builder. But I can not get the autoresizing

TableViewCell displays incorrectly in iOS 6

与世无争的帅哥 提交于 2019-12-07 12:16:35
问题 I have an annoying problem with displaying UITableViewCell with UIActivityIndicatorView inside. My tableView delegate loads portions of data. The last cell always indicates loading process while new portion is not loaded. Loading starts in tableView: willDisplayCell: forRowAtIndexPath: .So in iOS 5 (or iOS 5 simulator) it works perfectly, but in iOS 6 (or iOS 6 simulator) UIActivityIndicatorView displays only for the first time. Maybe something was deprecated since iOS 6 or it's iOS 6 bug?

iOS 6 - How can I get the “release to refresh” animation thing? like in mail?

你离开我真会死。 提交于 2019-12-07 11:21:58
问题 In mail app, we can now drag the view down and release to refresh , like shown in the picture below. Is this a standard thing I can get from SDK? Thanks 回答1: Use the new iOS6 UIRefreshControl class to do that. yourUITableViewController.refreshControl = [[[UIRefreshControl alloc] init] autorelease]; [yourUITableViewController.refreshControl addTarget:yourTableView action:@selector(reloadData) forControlEvent:UIControlEventValueChanged]; 回答2: If u need customized refresh control,

UIViewControllerHierarchyInconsistency worked in ios5 but not in ios6

丶灬走出姿态 提交于 2019-12-07 10:37:10
问题 I had a perfectly working project until i have updated to ios6. when i tab on a bar item to show a popover with a view the app crashes... here is the error i'm getting "reason: 'A view can only be associated with at most one view controller at a time! View <UIView: 0xaa7d730; frame = (20 0; 748 1024); autoresize = RM+BM; layer = <CALayer: 0xaa7d790>> is associated with <TYOFormViewController: 0xaa7d8b0>. Clear this association before associating this view with <TYOFormViewController:

Open Apple Maps and Start Route from Current Location to Home Immediately in iOS 6.0

故事扮演 提交于 2019-12-07 10:08:24
问题 I'm wanting to create a link in my application that essentially will be labelled "Take Me Home". When pressed, I want it to open Apple Maps, route from current location to home, and start turn by turn navigation. I have found this scheme, but it does not do everything I was hoping for: http://maps.apple.com/maps?saddr=%f,%f&daddr=%f,%f 回答1: Here is a working code for opening Maps with routes (including the option to show Google maps for iOS5) -(IBAction)showMapApp:(id)sender {

Calculating heading of compass to a specific coordinate instead of to north

爷,独闯天下 提交于 2019-12-07 09:33:37
问题 I can't get this algorithm right. I'm trying to make a compass that points at a certain location instead of just pointing to, let's say, north. Something is wrong. I've spent a lot of time trying to figure this out, but i just can't find it. Any ideas? - (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading{ double distanceEast = (location.longitude > 0 && otherLocation.longitude < 0) ? 180 - location.longitude + otherLocation.longitude - -180:

statusBarFrame = 0 after stacked presentViewController

萝らか妹 提交于 2019-12-07 09:08:48
问题 My main view controller calls presentViewController to display a configuration screen. A button on that configuration screen calls presentViewController to allow the user to select a photo. Once the second view controller is dismissed, the first view controller is redrawn under the status bar on iOS 6 (works fine on iOS 5). In the viewWillAppear method of the first config controller (the one modally presented) I tried a couple things: Checking the statusBarFrame (it returns 20 on first view;

Why do some dictionary keys have quotes and others don't when printing from debugger?

回眸只為那壹抹淺笑 提交于 2019-12-07 08:25:40
问题 So I am currently sending back from my server a JSON object. If I do a print of the responseObject in XCode, I get the following: Printing description of responseObject: { order = 3; "picture_bucket_name" = test; "picture_creation_date" = "2013-01-06T21:49:54.546Z"; "picture_identifier" = 61; "picture_url_with_bucket" = "test/pictures/sop/steps/test_default_320_320.png"; "sub_order" = 0; } Why is the Order key not in " "? This is the only key with a Number that I have to convert from NSString

Monotouch iOS 6 crash when using MFMailComposeViewController

十年热恋 提交于 2019-12-07 08:05:45
问题 I get a strange error when I use MFMailComposeViewController in Monotouch iOS 6, but it worked fine in iOS 5.1: *** Assertion failure in NSDictionary *_UIRecordArgumentOfInvocationAtIndex(NSInvocation *, NSUInteger, BOOL)(), /SourceCache/UIKit/UIKit-2372/UIAppearance.m:1118 Here is the code: MFMailComposeViewController _mail; public void SendFeedbackMail (string email_subject, string email_message_body, string[] email_recipients) { if (MFMailComposeViewController.CanSendMail) { _mail = new