Tag: ios9

.dylib文件丢失

我想在iOS 9中编译我的项目。我正在使用XCode7。 下面是它的样子:error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/lib/libz.dylib (No such file or directory) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/lib/libiconv.dylib (No such file or directory) 我的dylib文件显示为红色,所以我试图再次添加,但没有dylib文件,所有文件都显示在.tbd而不是.dylib 。 请帮我这个..

检查用户是否安装了Facebook Messenger的iOS 9

Facebook已经弃用了用于检查用户是否安装了Messenger应用程序的方法[FBSDKMessengerSharer messengerPlatformCapabilities] 。 在警告消息中,它说: 不推荐使用messengerPlatformCapabilities:从iOS 9开始不推荐使用。如果使用此选项,则必须按照https://developers.facebook.com/docs/ios/ios9中的说明configurationplist 我想删除这个方法,但还没有find任何其他的select来replace这个代码(如果用户没有安装Messenger应用程序,那么这个button会被禁用): if (![FBSDKMessengerSharer messengerPlatformCapabilities]) { [self.inviteFriendsButton setEnabled:NO]; [self.inviteFriendsButton setAlpha:0.5f]; } 有没有其他方法? 或者,作为新的iOS要求,我应该避免使用这个if ? 先谢谢你。

Swift:如何记住进一步的http请求的cookie

我正在开发一个login应用程序。 成功的login响应返回cookie数据。 我如何使用/保存这些数据用于将来的请求? 对于初学者,我试图将其保存在NSHTTPCookieStorage 。 但是这也不起作用。 login方法(部分): let task = session.dataTaskWithRequest(request) { (data, responseData, error) -> Void in if let response = responseData as? NSHTTPURLResponse { statusCode = response.statusCode print("Response code: \(statusCode)") } var json: NSDictionary? do { json = try NSJSONSerialization.JSONObjectWithData(data!, options: .MutableLeaves) as? NSDictionary } catch { print(error) err = error } if(statusCode […]

iOS 9上的Safari不会在隐藏的input文件上触发点击事件

我有一个网站上传字段,但input隐藏display: none; 我有一个调用这个动作的div 。 它在iOS 8上工作,但是现在在iOS 9更新之后,当我在div中触摸时,没有任何反应。 我尝试使用[0].click() .click [0].click()或纯的VanillaJS像document.getElementById('file_input').click()并没有什么作品。 所有这些方法都可以在iOS 5和iOS 8之间使用。 如果你想要,在JSFiddle上链接到这个例子: https ://jsfiddle.net/o1r265tz/6/embedded/result/ $(document).ready(function(){ $(document).on('click touchstart', '.upload-box', function(e){ e.stopPropagation(); $('.form-upload input.file-input').trigger('click'); $('.debug').append('<p>Clicked!</p>'); console.log('Clicked!'); return false; }); }); .upload-box { border: 3px solid #999; padding: 10px; text-align: center; border-radius: 5px; font-size: 35pt; font-family: Arial; color: #555; } .form-upload { display: none; } <script […]

自定义Googleloginbutton – iOS

我想要自定义Google Sign-Inbutton,如下所示: 我已经尝试下面的链接,但没有一个帮助非常: – 如何自定义谷歌loginbutton? https://developers.google.com/identity/sign-in/ios/ 请有人指导我应该做什么? 我无法使用Google+loginbutton,因为“ Google+login已弃用 ”。 编辑: – 我试过下面的链接提供的代码: – https://developers.google.com/identity/sign-in/ios/sign-in#add_the_sign-in_button

iOS 9禁用从右到左语言的支持

我的iOS应用程序只有阿拉伯语(从右到左)的语言。 在iOS 9之前,视图布局和视图animation默认为从左到右。 所以,我已经定制完整的应用程序,并已经扭转了默认行为,例如导航栏中的后退button被设置为在右侧而不是默认左侧。 但现在,当使用最新的SDK(Xcode 7 beta 4)编译应用程序时,一切与我所需要的相反。 有没有简单的方法来强制应用程序显示视图和行为像iOS 8和7? 我search并find了一个解决scheme,但它涉及到所有视图的约束(取消select“尊重语言方向”)。 但在大型项目中这不是一个可行的解决scheme。 这是与Xcode 7 beta 4编译后的屏幕截图。 这是使用Xcode 6编译时的屏幕截图。

UIAlertController着色颜色默认为蓝色

我使用下面的代码来呈现一个UIAlertController操作表,其中的项目文本为红色。 我使用了tint属性来设置颜色。 UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; alertController.view.tintColor = [UIColor redColor]; 文本颜色似乎是默认为高亮或select蓝色。 这是正常的,我该怎么办?

无法更改iOS 9 beta / 9.3上的WKWebView的滚动速度

在iOS 8上,下面的代码工作正常,它可以滚动更多的惯性。 webView.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal; 至于iOS 9 beta 3,这个代码是没有意义的,即使没有错误。 这是一个错误还是有其他方法? 注意:UIWebView的滚动速度可以在两个版本上更改两种types。

仅在UITableView中显示可用CellForRow的分隔符

我正在使用自定义单元格的UITableView。 它工作正常,但问题是当UITableView中只有一个或两个单元格。 它也给空单元的分隔符。 是否有可能显示分隔符只有与我的自定义单元格加载的单元格?

canOpenURL无法使用系统范围的URLscheme

我正在运行iOS 9b5。 在我的应用程序中,如果设备可以拨打电话,我想将文本颜色设置为蓝色,以使其看起来可以点击。 如果不是,我把它留下黑色。 为了确定设备function,我使用: [[UIApplcation sharedApplication] canOpenURL:@"telprompt://5555555555"] 众所周知,iOS 9要求将我们将在我们的应用中使用的任何URLscheme列为白名单,作为隐私措施。 我在Info.plist中有这个: <key>LSApplicationQueriesSchemes</key> <array> <string>telprompt</string> </array> 无论我做什么,我仍然canOpenURL:URL失败:“telprompt:/ /” – 错误:“(空)”。 我试过电话:/和短信:/ /我似乎无法避免该系统日志警告。 有谁知道一种方法来检测设备是否可以拨打电话,而不会触发这些警告?