草庐IT

last_lock_in_thread

全部标签

ios - CoreBluetooth [警告] 未知错误 : 311 Occurs when repeatedly connect and disconnect using CoreBluetooth Framework in iOS

当我尝试连接蓝牙设备时,它反复连接失败并显示错误CoreBluetooth[WARNING]Unknownerror:311。我正在使用2个iPod5Touch设备。 最佳答案 我也遇到过这个,它似乎是CoreBluetooth的XPC通信中的一个错误:2013-03-2214:49:24.652Buggy[985:907]Connectingtoperipheral2013-03-2214:49:24.659Buggy[985:907]CoreBluetooth[WARNING]Unknownerror:3112013-03-22

ios - "Invalid use of ' 这个 ' in non-member function"在 objective-c 上下文中?

使用Xcode。在这段代码中(func在接口(interface)中声明),告诉subj错误,用'self'站在字符串上。+(void)run:(Action)actionafter:(int)seconds{[selfrun:actionafter:secondsrepeat:NO];}什么是...? 最佳答案 self是一个实例变量,用于引用当前对象的实例。您正试图在类级别方法+(void)...中使用它,其中self没有任何意义。尝试使用共享实例,或将相关类的实例传递给方法。+(void)run:(Action)actiono

ios - x.y = z 和 [x setY :z]; in objective-C? 有什么区别

这个问题在这里已经有了答案:关闭10年前。PossibleDuplicate:Style:Dotnotationvs.messagenotationinObjective-C2.0Objective-CPropertyAccess在拒绝我的菜鸟问题之前:当涉及到这个问题时,我不知道要搜索什么。无论如何,假设我正在尝试更改ImageView的背景颜色,有什么区别之间:imageView.backgroundColor=[UIColororangeColor];和[imageViewsetBackgroundColor:[UIColororangeColor]];我知道第一个可以用来获取实

ios - ld : 1 duplicate symbol for architecture arm64 : two same variables in two different classes?

我来自Java世界,所以我的问题可能看起来很愚蠢。为什么当我在两个不同的实现类中有相同的变量(NSString对象)名称时编译器会报错?默认情况下它们不是私有(private)的吗?是禁止的吗?是否有任何build设置要更改?毕竟,因为我在这里不使用iVar,所以我是否以C/C++风格声明了这个变量?例子:示例类.h#import@interfaceSampleClass:NSObject{...}@end另一个类.h#import@interfaceAnotherClass:NSObject{...}@end样本类.m#import"SampleClass.h"@implementa

ios - ADALiiOS :Cannot add a new item in the keychain/O365-iOS-Connect-Swift

我目前正在开发一个连接到Office365的iOS应用程序,目标为iOS7。使用了以下pod:pod'ADALiOS','~>1.2.1'pod'Office365/Outlook','=0.9.1'pod'Office365/Discovery','=0.9.1'当我在模拟器中运行它时一切正常。当我在设备上运行它时,出现“无法在钥匙串(keychain)中添加新项目”错误。我还尝试了共享钥匙串(keychain)功能,但这并没有改变任何东西。这是错误消息,它甚至在我从Github运行O365-iOS-Connect-Swift示例时出现:2015-06-1620:44:58.758O

ios - 应用程序 :didReceiveLocalNotification: not called when app in background

当我的应用程序进入后台时,系统会自动调用applicationDidEnterBackground并在该方法中触发本地通知。但是didReceiveLocalNotification:方法没有被调用-(void)applicationDidEnterBackground:(UIApplication*)application{UIApplication*app=[UIApplicationsharedApplication];bgTask=[appbeginBackgroundTaskWithExpirationHandler:^{bgTask=UIBackgroundTaskInva

ios - popViewController :animated: not working in iOS 9

我正在使用子类化的UINavigationController,它管理我的应用程序中的所有viewController。它在主流程中推送和弹出viewControllers,并以模态方式呈现和关闭那些任意需要的viewControllers。在一种情况下,我需要在主流程中弹出另一个ViewController之前以模态方式呈现一个ViewController,如下所示://CalledincustomUINavigationControllersubclass[selfpresentViewController:searchVCanimated:YEScompletion:^{[sel

ios - 如何更改 UIButton : The signup button in Parse`s PFLoginViewController 的颜色

如何更改ParsesPFLoginViewController`中注册按钮的(背景)颜色?我试过:PFLogInViewController*logInViewController=[[PFLogInViewControlleralloc]init];logInViewController.fields=PFLogInFieldsUsernameAndPassword|PFLogInFieldsLogInButton|PFLogInFieldsPasswordForgotten|PFLogInFieldsSignUpButton;logInViewController.logInVie

ios - 'initWithRequest :delegate:' is deprecated: first deprecated in iOS 9. 0 - 使用 NSURLSession(参见 NSURLSession.h)

我是objective-c中的新手,使用iOS9Xcode7.2并收到此警告“'initWithRequest:delegate:'已弃用:在iOS9.0中首次弃用-使用NSURLSession(请参阅NSURLSession.h)”如何解决它。我的代码如下。+(id)createGetConnectionWithName:(NSString*)strConnectionName_withUrl:(NSString*)pageUrlparameterNames:(NSArray*)arrParamNamesparameterValues:(NSArray*)arrParamValues

ios - 为什么安装Google Sign In SDK会安装Firebase - Cocoapods

我想在我的IOS应用中实现GoogleSignIn。我正在使用cocoapods添加sdkpod'Google/SignIn'但是podinstall-安装firebaseUsingFirebaseAnalytics(3.6.0)UsingFirebaseCore(3.4.5)UsingFirebaseInstanceID(1.0.8)UsingGTMOAuth2(1.1.4)UsingGTMSessionFetcher(1.1.7)UsingGoogle(3.0.3)UsingGoogleAppUtilities(1.1.2)UsingGoogleInterchangeUtiliti