我如何实现禁用的应用程序设置?

我如何实现禁用的应用程序设置? 我在Nike Running应用程序中看到了这个function。 我search了很多这个function,但找不到一个可能的解决scheme。 在苹果网站和互联网上没有教程或没有参考。 有任何想法吗 ? 在此先感谢你们…

GCM中的Swift Bundle ID错误

我在Swift中执行Google Cloud Messaging时遇到了麻烦。 使用GCMExample获取注册令牌,但是当我尝试运行Swift的GCMExampleSwift时,出现错误。 我在Objective C和Swift中使用了相同的“GoogleService-Info.plist”。 2015-10-26 17:31:59.834 GcmExampleSwift [360:51727]configuration文件'GoogleService-Info.plist'用于另一个包标识符('com.XXXXXX.mobility.appfactory.dev1.social')。 使用此文件可能无法正确configuration服务。 要继续使用此configuration文件,可以将应用程序的包标识符更改为“com.XXXXXX.mobility.appfactory.dev1.social”。 或者您可以从https:/ 2015-10-26 17:31:59.836下载与您的捆绑包标识符相匹配的新configuration文件GcmExampleSwift [360:] App measurement v.1100000开始2015-10-26 17:31:59.843 GcmExampleSwift [ 360:51727]成功configuration[CloudMessaging]。 2015-10-26 17:31:59.843 GcmExampleSwift [360:51727]configuration[]失败。 2015-10-26 17:31:59.843 GcmExampleSwift [360:51727]子类不存在,所以没有configuration[Analytics,AdMob,SignIn,AppInvite,Maps]。 2015-10-26 17:31:59.843 GcmExampleSwift [360:51727]希望存在的子类[CloudMessaging,Measurement]。 2015-10-26 17:31:59.936 GcmExampleSwift [360:]networking状态已经改变。 代码,状态:2,连接2015-10-26 17:31:59.977:GGLInstanceID | 无法在caching中find令牌Error Domain = com.google.iid Code = -25300“(null)”注册到GCM失败,错误:操作无法完成。 (com.google.HTTPStatus错误401.)2015-10-26 17:32:01.053 GcmExampleSwift [360:51727] – 在变换层中更改属性masksToBounds,将不起作用2015-10-26 […]

iOS的HTML到NSString的Unicode?

我正在将一个Android应用程序移植到iOS上,并遇到了一个小小的障碍。 我从网页中拉取HTML编码的数据,但是一些数据以Unicode显示,以显示外来字符…所以俄语(Летизамной)中的字符将被parsing为"Лет…" 在android中我可以通过调用HTML.fromHTML()来解决这个问题。 有什么类似的iOS?

在UITextView中获取当前键入的单词

我试图制作一个“标签窗口”,非常类似于在Facebook上使用的那个你input“@”的标签窗口,并且在你的朋友之间提出build议,在哪个标签上标注。 我想在我的应用程序中的这个function,但我不能为我的生活弄清楚如何获取当前键入的单词,以过滤build议。 我使用UITextView ,我一直在看这个posthttps://stackoverflow.com/a/27380612/4148782 但我有问题翻译到Swift 3,即使如此评论表明,这还没有解决。 所以我之后的function是: 用户开始在UITextViewinput,如果单词以“@”开始,我想提取单词。 我想用一定的input来代替这个词。 比方说,用户input@abc ,然后过滤一个提示“ abcdef ”,然后我想用“ abcdef ”代替UITextView中的@abc 。 请注意,我希望当前input的单词不是最近input的单词。

Swift:无法将types'__NSCFArray'的值转换为'NSDictionary'

我有来自网站的JSON数据。 我做了主要的字典,我可以parsing除了一个子字典以外的每一个数据。 我得到错误“Swift:无法将types'__NSCFArray'的值转换为'NSDictionary'” 我的数据的这个例子。 我不能parsing“天气”,但我可以parsing所有其他字典,如"wind" 。 ["name": Mountain View, "id": 5375480, "weather": ( { description = "sky is clear"; icon = 01n; id = 800; main = Clear; } ), "base": cmc stations, "wind": { deg = "129.502"; speed = "1.41"; 代码片段 let windDictionary = mainDictionary["wind"] as! [String : AnyObject let speed = windDictionary["speed"] as! […]

ld:找不到-l使用cocoapods的库

每个人 我遇到的问题是我无法编译我的应用程序,因为我得到以下错误: ld: library not found for -lBolts clang: error: linker command failed with exit code 1 (use -v to see invocation) 我有我的XCode项目configuration使用cocoapods,这是我的豆荚列表: pod 'Google/Analytics', '~> 1.0.0' pod 'AFNetworking', '~> 2.0' pod 'XCDYouTubeKit', '~> 2.4.0' pod 'FBSDKCoreKit' pod 'FBSDKShareKit' pod 'FBSDKLoginKit' pod 'Parse' pod 'ParseUI' pod 'ParseFacebookUtilsV4' pod 'ParseTwitterUtils' 这是命令pod install的输出: Updating local specs repositories […]

从UITableViewCell中将UIImageView展开为全屏

我有一个UITableViewCell的UIImageView ,并希望展开它来填充整个屏幕,我已经安装我的UIGestureRecognizer并使用此代码来扩大框架: [UIView animateWithDuration:1.0 animations:^{ [self.ImageView setFrame:[[UIScreen mainScreen] applicationFrame]]; }]; 但是, UIImageView将只扩展到填充UITableViewCell并不填满整个屏幕。 任何帮助将非常感激。

SWIFT:错误EXC_BAD_INSTRUCTION

运行我的应用程序并尝试注册用户后出现以下错误: 线程1:EXC_BAD_INSTRUCTION(code = EXC_l386_INVOP,s子代码= 0x0) 这出现在代码的末尾: 作为! (Data ?, URLResponse ?,错误?) – > Void) let myUrl = NSURL(string: "http://127.0.0.1/MySQL_PHP/userRegister.php") var request = URLRequest(url: myUrl as! URL) request.httpMethod = "POST" // let config = URLSessionConfiguration.default let session = URLSession.shared let postString = "email=\(userEmail)&passwort=\(userPasswort)&vorname=\(userVorname)&nachname=\(userName)&benutzer=\(userBenutzer)" request.httpBody = postString.data(using: String.Encoding.utf8) let task = session.dataTask(with: request, completionHandler: { (data: Data?, […]

如何删除所有项目,如果我在tableview中删除它们之一?

我有两个collectionView一个是主要项目和其他是为子项目 主要项目,我们可以考虑为iPhone 子项目,我们可以认为是苹果的耳机 所以我们可以说这两个项目“一个小组” 这两个项目都添加在DidSelectMethod和显示在tableView中 我有一个删除这个项目的选项 我的要求是,如果我从这个组中删除任何一个项目,我应该清除所有的tableview数据 这里是我用来删除产品的代码 //在cellForRowAtIndexPath中定义button动作 cell.btnDelete.addTarget(self, action:#selector(ViewController.btnDeleteTapped(_:)), forControlEvents: .TouchUpInside) cell.btnDelete.tag = indexPath.row //button操作 func btnDeleteTapped(sender: UIButton){ self.arrProductCart.removeObjectAtIndex(sender.tag) self.tblCart.reloadData() } MainProduct数组 ( { "addtional_price" = 0; "barcode_image" = ".png"; "cart_unique_id" = 6; "chicken_product" = all; "created_by" = 2; "created_date" = "2015-11-19 21:39:24"; "deleted_date" = "0000-00-00 00:00:00"; ids = 151; isFromMain = 1; […]

升级到iOS 9和MobileFirst 7.1后无法在设备或模拟器上login应用程序

使用Ionic和IBM MobileFirst构build的混合应用程序在通过XCode构build并部署到设备或通过iOS模拟器升级到iOS 9和MF 7.1后无法login。 我正在Eclipse中的本地WebSphere Liberty服务器上运行此操作,因此不涉及SSH,因此遵循了从下面的链接中禁用位代码和ATS的说明,而没有任何效果。 https://developer.ibm.com/mobilefirstplatform/2015/09/09/ats-and-bitcode-in-ios9/ 然而,该应用程序能够使用MF Mobile Browser Simulatorlogin,只有在设备或iOS模拟器上尝试login时才会失败,所以我确定这是与构build过程而不是应用程序错误。 这是我得到的日志跟踪,似乎没有find服务器IP(我已经模糊),但是这是我的本地Liberty服务器的正确的IP 其他人有类似的问题? 任何帮助将非常感激! 2015-10-20 14:01:02.269 WorkManagement[26452:2390658] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/Eugene/Library/Developer/CoreSimulator/Devices/49A9535D-0085-4FD6-A57F-A45D0F7E7819/data/Containers/Data/Application/86E6CEFF-F2E5-4523-9763-A421A1A64659/Library/Cookies/com.WorkManagement.binarycookies 2015-10-20 14:01:02.427 WorkManagement[26452:2390658] [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: Splash screen image is taken from UILaunchImages: Default-667h 2015-10-20 14:01:02.453 WorkManagement[26452:2390658] [DEBUG] [WL_SPLASH] -[WLSplashView updateImage] in WLSplashView.m:189 :: […]