ios6

UIScrollView in iOS 6

别等时光非礼了梦想. 提交于 2019-12-03 02:44:08
Recently i've downloaded Xcode 4.5(iOS 6),but when tried to continue one of my projects i noticed that the UIScrollView isn't working properly,let me explain more clearly: I've created the UIScrollView and added the initialized it using the following code: -(void)viewDidLoad{ [mainScrollView setScrollEnabled:YES]; mainScrollView.contentSize = CGSizeMake(480, 0); [super viewDidLoad]; } After i opened my XIB and linked the mainScrollView to a UIScrollView,after i added some UIButton's to the scrollView.When i built the project the mainScrollView was scrolling but the buttons didn't showed up,i

iOS 6 debug console gone?

£可爱£侵袭症+ 提交于 2019-12-03 02:37:02
问题 I used to use the "Debug Console" for mobile Safari to print out console.log messages when I'm troubleshooting. With iOS 6, in Safari's advanced settings, the "Web Inspector" replaced the "Debug Console." Unfortunately, my company doesn't allow me to plug the phones we're testing with into the computers we're developing on. Does anyone know how to enable messages printed by using console.log() to be show on iPhones with iOS 6? 回答1: I have found it helpful to output any JS errors with an alert

UIButton not calling action in iOS 5 but works in iOS 6

╄→гoц情女王★ 提交于 2019-12-03 02:36:56
I have a UIButton that is loaded from a xib file as an IBOutlet property of a view controller. I attach a selector to the button in the viewDidLoad of my view controller: [_myButton addTarget:self action:@selector(mySelector) forControlEvents:UIControlEventTouchUpInside]; In iOS 6 everything works, but when i run on the simulator in iOS 5.0 the selector doesn't get called. The button does highlight when it is touched. Another thing to note is that the button is in a UIView that has a UITapGestureRecognizer added to it. The UITapGestureRecognizer for this view gets called in iOS 5.0 when the

Using autolayout constraints programmatically

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 02:27:08
I'm trying to use autolayout in my iOS app programmatically. I have a simple view controller with this init code UIView *innerView = [[UIView alloc] initWithFrame:self.view.bounds]; UIButton *button1 = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button1 setFrame:CGRectMake(50, 50, 150, 50)]; [button1 setTitle:@"button1" forState:UIControlStateNormal]; UIButton *button2 = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button2 setFrame:CGRectMake(250, 50, 150, 50)]; [button2 setTitle:@"button2" forState:UIControlStateNormal]; [innerView addConstraints:[NSLayoutConstraint

How to change Statusbar on Modal Views iOS 6

≡放荡痞女 提交于 2019-12-03 02:22:41
I have the following constellation: Main View (Custom UIViewController, no navigationcontroller or navigation bar), containing a button which segues modally to a second Table view controller, which is embedded in a Navigation Controller: MainView -> Navigation Controller -> TableView On the MainView the status bar is Black (no changes with iOS 6 - even when Status Bar is set to Default) On the TableViewController the status bar should have Default Style (grey in iOS 5, Blue Tinted due to navigation bar in iOS 6). In iOS 5 this was easy by the following lines of code in TableViewController: if

Set background color on UITableView in IOS 6 [duplicate]

久未见 提交于 2019-12-03 02:14:16
Possible Duplicate: Change background of a grouped UITableView I am not able to change the background color of UITableView if it is UITableViewStyleGrouped . My code : [addressNewTbl setBackgroundColor:[UIColor redColor]]; Help! You might need to add some code. Try - [UITableView setBackgroundView: nil]; or you can also do : UIView* bview = [[UIView alloc] init]; bview.backgroundColor = [UIColor yellowColor]; [tableView setBackgroundView:bview]; Both will work.. Did you try addressNewTbl.backgroundView = nil; [addressNewTbl setBackgroundColor:[UIColor redColor]]; You additionally need to

Call Maps for directions from inside your app - iOS5 iOS6

江枫思渺然 提交于 2019-12-03 02:06:26
问题 Here is a strange problem: My app should be able to call the built in Maps in iOS (both 5.1 and 6). Turns out that it works just fine under iOS6 but not under iOS5.1. The maps in iOS6 is called and the directions from saddr to daddr is traced but when I am in iOS5 the maps app is called but just one pin is put at the daddr. For some unknown reason the initial coordinates (saddr) are not showing and no direction is traced. Here is my code: addr = [NSString stringWithFormat: @"maps://saddr=%f,

iOS 6 Saving/Restoring app state feature

社会主义新天地 提交于 2019-12-03 02:01:49
I'm trying to use the new Saving/Restoring app state feature on iOS 6, but (application:shouldRestoreApplicationState:) method is not called if I killed the app so it doesn't restore the app state, but If I'm running it from the debugger it gets called. It worked when I added (Application does not run in background) in the plist and set it to YES, I don't want to set it to YES though. I was wondering if anyone got it working without setting the (Application does not run in background) to YES. From the Apple docs: The system automatically deletes an app’s preserved state when the user force

iOS 6 - Facebook sharing procedure fails with error “The proxied app is not already installed”

南笙酒味 提交于 2019-12-03 02:00:18
Though, there is such a question Facebook Error (7) iOS 6 it's already closed without any answer! While obtaining an access to user's facebook account I've got an error: error is: Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: The proxied app is not already installed." UserInfo=0xa260270 {NSLocalizedDescription=The Facebook server could not fulfill this access request: The proxied app is not already installed.} I'm performing a request like this: self.statusLabel.text = @"Waiting for authorization..."; if (self.accountStore == nil) { self

How to use iOS Simulator 7 \ XCode 5 to test pre-iOS 7 UI (without upgrading the app for iOS 7)

纵然是瞬间 提交于 2019-12-03 01:58:24
问题 Compiling my app on XCode 4.6.3 and running it on iOS 7 works great. Compiling my app on XCode 5 and running it on iOS 7 results a big UI mess I don't want to handle right now. (iOS 7 pickers, tabbars, tableviews etc') Goal: I want to be able to use XCode 5 and test my app on the iOS 7 simulator but still use the iOS 6 and lower UI and feel. Reason: I don't want to redesign my app to iOS 7 but I do want to make sure it runs fine on iOS 7 using XCode 5 iOS 7 simulator. Is there a quick toggle