xcode4.5

ERROR data argument not used by format string on mySLComposerSheet

大城市里の小女人 提交于 2020-01-02 04:27:07
问题 I'm a bit confused at why I'm getting the ERROR 'data argument not used by format string' Has anybody else got this or fixed this in Xcode 4.5 for iOS6? - (IBAction)facebookPost:(id)sender { if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) { mySLComposerSheet = [[SLComposeViewController alloc] init]; mySLComposerSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; [mySLComposerSheet setInitialText:[NSString stringWithFormat:

How to set up working logic unit tests target in Xcode 4.5 “Command Line Tool” project?

落爺英雄遲暮 提交于 2020-01-01 09:13:13
问题 Having trouble getting unit tests set up for a specific scenario. Here's what I'm trying: In Xcode 4.5, I created a simple OSX "Command Line Tool" application project (Foundation). Note that Xcode does not provide the option to add unit tests to a "Command Line Tool" project automatically – so please don't suggest ticking the ticky-box; it ain't there :-/ In my project, I created a trivial example class that I'd like to test; e.g. "Shape". I followed instructions in Apple's Xcode Unit Testing

How to simulate protected properties and methods in objective-c [duplicate]

浪尽此生 提交于 2020-01-01 03:04:29
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Protected methods in objective-c The way to declare private properties is simple. You declare that in extension that's declared in .m files. Say I want to declare protected properties and access it from the class and subclass. This is what I tried: // // BGGoogleMap+protected.h // // #import "BGGoogleMap.h" @interface BGGoogleMap () @property (strong,nonatomic) NSString * protectedHello; @end That one is compile

What do these Dsymutil Warnings mean in XCode 4.5?

陌路散爱 提交于 2019-12-31 10:40:59
问题 I am linking a static framework for iOS, against an armv7 ios 6 application, I suspect that the original binaries are from XCode 3.x and were compiled with GCC, and that I'm now linking it using CLang compiler. I do not have the source code for the framework, only the binaries: (null): warning: (armv7) /.../DerivedData/.../armv7/HardwareObjectFile.o unable to open object file I get 69 warnings like the above, one for every .o file linked into the static framework. Is this warning serious for

Should I initialize my viewController on viewDidLoad or viewWillLayoutSubviews

一笑奈何 提交于 2019-12-30 09:59:18
问题 I noticed that sometimes on viewDidLoad I got the view size right. Sometimes I don't. For example - (void)viewDidLoad { [super viewDidLoad]; self.pullToRefreshController = [self.pullToRefreshController initWithDelegate:self]; PO(self.view); PO(self.view.superview); PO(self.view.superview.superview); PO(self.view.superview.superview.superview); while(false); } -(void)viewWillLayoutSubviews { PO(self.view); PO(self.view.superview); PO(self.view.superview.superview); PO(self.view.superview

Should I initialize my viewController on viewDidLoad or viewWillLayoutSubviews

孤人 提交于 2019-12-30 09:59:14
问题 I noticed that sometimes on viewDidLoad I got the view size right. Sometimes I don't. For example - (void)viewDidLoad { [super viewDidLoad]; self.pullToRefreshController = [self.pullToRefreshController initWithDelegate:self]; PO(self.view); PO(self.view.superview); PO(self.view.superview.superview); PO(self.view.superview.superview.superview); while(false); } -(void)viewWillLayoutSubviews { PO(self.view); PO(self.view.superview); PO(self.view.superview.superview); PO(self.view.superview

Allowing only alphabets in textField

半腔热情 提交于 2019-12-30 07:27:07
问题 I want to make a UITextField to accept only characters and display error when numbers or special characters are entered.But when Im doing so ,when I enter alphabets also error is displayed.Could not understand where I going wrong? NSString *FNameReg=@"[A-Za-z]"; NSPredicate *FNametest=[NSPredicate predicateWithFormat:@"SELF MATCHES %@",FNameReg]; if(![FNametest evaluateWithObject:txtfirstname.text]) { lblvalidateFName.hidden=NO; [testScroll setContentOffset:CGPointMake( 0 , 74)]; return; }

xcode 4.5 how to pick storyboards at launch

微笑、不失礼 提交于 2019-12-28 01:45:45
问题 Trying to make my app work with both iPhone 5 and iPhone 4/4s. I tried the "AutoLayout" but does not seem to work for my app also read that it is not supported in iOS 5. AutoLayout specifically fails on a view controller that has an UIScrollview and a UIPicker that is re-sized in code. Having two Storyboards one for 4 inch and one for 3.5 inch seems the way to go. The two Storyboard aproch seem to be the solution for me. So this leaves me with two questions; Where should the code to detect

How to detect the pressed button and display it on Another View? Objective-C

淺唱寂寞╮ 提交于 2019-12-25 19:37:22
问题 I am new to iOS app development. I want to create a Calculator App in iOS that has split view. The left side is the "History" Feature in Scroll View and the right side is the calculator itself. Now, regarding the History feature of this app, I am thinking that my program needs to recognize what has been pressed and display it on the Scroll View when the Equal (=) button is pressed. Do you have any idea how will this go on Objective-C? I am using XCode 4.5 and iPhone Simulator 6.0. Thanks in

How to detect the pressed button and display it on Another View? Objective-C

百般思念 提交于 2019-12-25 19:37:02
问题 I am new to iOS app development. I want to create a Calculator App in iOS that has split view. The left side is the "History" Feature in Scroll View and the right side is the calculator itself. Now, regarding the History feature of this app, I am thinking that my program needs to recognize what has been pressed and display it on the Scroll View when the Equal (=) button is pressed. Do you have any idea how will this go on Objective-C? I am using XCode 4.5 and iPhone Simulator 6.0. Thanks in