草庐IT

ios - 试图在标签栏 Controller 之间传递数据

我正在尝试在标签栏中的View之间传递一些数据。我的第一个View能够从我的模型类加载数据并对其进行操作。但是当我点击标签栏Controller中的第二个或第三个标签时,数据没有被传递。这是我试图通过它的方式。-(void)tabBarController:(UITabBarController*)tabBarControllerdidSelectViewController:(UIViewController*)viewController{if(tabBarController.selectedIndex==1){HashTagTableViewController*hash[[H

iphone - 我试图从我的资源中播放一个 MP4 文件,但它没有播放。帮我解决这个问题

我正在尝试从我的资源中播放一个MP4文件,但它没有播放。...我还有什么要做的。帮我解决这个问题....NSString*urlStr=[[NSBundlemainBundle]pathForResource:@"line.mp4"ofType:nil];NSURL*url=[NSURLfileURLWithPath:urlStr];MPMoviePlayerController*moviePlayer=[[MPMoviePlayerControlleralloc]initWithContentURL:url];[self.viewaddSubview:moviePlayer.view

ios - 适用于 iOS 的 Google Maps SDK 试图在 iOS 4.3 上运行

我成功地将sdk与我的应用集成。我的应用旨在与适用于iOS6的GoogleMapssdk一起运行,以及适用于iOS4.3和5.x的AppleUIMapKit。由于我添加了googlemaps框架,ios4.3将不再运行。我将GLKit.framework和GoogleMaps.framework更改为“可选”,在应用程序启动之前,我得到dyld:Symbolnotfound:_NSFileProtectionCompleteUntilFirstUserAuthentication。需要你的帮助:-) 最佳答案 我的应用程序在iOS4

ios - 应用程序试图以模态方式呈现事件 Controller ios

在显示它可以提供回调之前,我试图用父ViewController设置ViewController,我使用PrepareForSegue-(void)prepareForSegue:(UIStoryboardSegue*)seguesender:(id)sender{if([segue.identifierisEqualToString:@"newQuarter"]){[segue.destinationViewControllersetParentViewController:self];}}它崩溃并给我错误消息:Termatingappduetouncaughtexception'N

ios - 试图恢复消耗性 IAP 的沙箱

我一直在尝试在iOS上测试一些消耗性IAP,但我遇到了一个奇怪的错误。弹出一strip有文本的警告:"ThisIn-AppPurchasehasalreadybeenbought.Itwillberestoredforfree.[Environment:Sandbox]"我已经检查过,我确定我的IAP可以在iTunesConnect中使用。似乎我的验证过程以某种方式失败了,但我不希望出现此错误消息。有没有人有这方面的经验? 最佳答案 我不确定这是否是正确的操作,但是调用:[[SKPaymentQueuedefaultQueue]fi

ios - 当我试图覆盖 getter 时,这个语法是什么?

当我试图覆盖getter时,这是什么语法??我只是想了解更多有关属性在Objective-C中的工作原理的信息。这是我的属性(property):@property(nonatomic,strong)UIView*myView;当我尝试覆盖getter时,我得到了帮助:-(void)getMyView:(**)bufferrange:(NSRange)inRange{}我知道我可以使用这个:-(UIView*)myView{}但我只是想知道以前的方法是做什么的,为什么会这样等等。感谢您的帮助! 最佳答案 如Key-ValueCodi

ios - 试图理解 TranslationInView

在我的UITableViewCell子类中,我添加了一个平移手势,在gestureRecognizerShouldBegin方法中,我检查了self.frame.origin.x和self.frame.origin.y都是0.000000和0.000000在应用TranslationInViewCGPointtranslation=[gestureRecognizertranslationInView:[selfsuperview]];我得到x=-4.000000和y=0.000000TranslationInView是如何工作的,当我得到单元格0.0和0.0的正确位置时,我正在努力思

ios - 应用程序试图在目标 "Current View Controller"上呈现一个 nil 模态视图 Controller

我有一个带xib的UIViewController,当我尝试在其上呈现StoryboardView时,它崩溃了。我用这个来展示它UIViewController*buddiesOrFacebook=[self.storyboardinstantiateViewControllerWithIdentifier:@"BuddiesFBFriends"];[selfpresentViewController:buddiesOrFacebookanimated:YEScompletion:nil]; 最佳答案 检查这些东西检查ViewCon

ios - 试图保存 NSManagedObjectContext 不工作

我已经尝试解决这个问题2天了。我在尝试保存时不断收到错误消息。//self.dataisNSManagedObject.kAppDelegate.mocisthemanagedobjectcontext.self.data=[NSEntityDescriptioninsertNewObjectForEntityForName:@"Data"inManagedObjectContext:kAppDelegate.moc];[self.datasetValue:[NSNumbernumberWithBool:NO]forKey:@"isit"];[self.datasetValue:@""

ios - 试图给 UILabel 一个阴影,但它不会出现

我试图在我的应用程序的一个类中为标签提供投影,但它根本不起作用。什么都没有出现。我做错了什么?//SetlabelpropertiestitleLabel.font=[UIFontboldSystemFontOfSize:TITLE_FONT_SIZE];titleLabel.adjustsFontSizeToFitWidth=NO;titleLabel.opaque=YES;titleLabel.backgroundColor=[UIColorclearColor];titleLabel.textColor=titleLabelColor;titleLabel.shadowColor