Tag: ios11

iOS 11浮动TableView标题

有一个应用程序与多个部分,每个部分几行时,“展开”,没有“折叠”时。 每个部分都有一个section header,正在使用UITableViewHeaderFooterView的子类等来重用它们。 然后在iOS 11中: 描述问题的屏幕截图 我使用了可视化debugging器,并确认这是我的部分标题浮动。 标题下面的所有行显示正确,其他标题显示正常。 为了恢复理智,我抛出了头部的所有重用逻辑,并以编程方式进行编程。 彼此彼此。 所有在iOS 11之前的工作,仍然在iOS 11中浮动。漂浮的部分似乎每次都会改变,所以就是这样。 有任何想法吗?

iOS 11 – 无法更改导航栏高度

我在一个应用程序上工作,我刚刚升级到Xcode 9 / Swift 4,并将我的iPhone升级到了iOS 11.当我安装了iOS 11时,应用程序已经安装好了,并且在我从Xcode运行它之前,所有的东西都没有问题。 现在我坚持默认的NavBar高度。 我用来更改高度的代码不再有效: class CustomNavControllerVC: UINavigationController { let navBarHeight : CGFloat = 64.0 let navbarBackButtonColor = UIColor(red: 247/255, green: 179/255, blue: 20/255, alpha: 1) override func viewDidLoad() { super.viewDidLoad() print("CustomNavControllerVC > viewDidLoad") } override func viewDidLayoutSubviews() { print("CustomNavControllerVC > viewDidLayoutSubviews") super.viewDidLayoutSubviews() navigationBar.frame.size.height = navBarHeight navigationBar.tintColor = navbarBackButtonColor } override […]

在Xcode9 iOS11应用程序版本中缺lessCFBundleIconName

我正在努力使用iOS 11 SDK构build的Xcode 9发布我们的应用程序的新版本。 归档和上传二进制文件没有任何问题。 构build出现在iTunes Connect下的“处理”活动中,然后消失,我收到以下电子邮件。 亲爱的开发者 我们已经发现了一个或多个与您近期交付“”的问题。 要处理您的投递,必须纠正以下问题:缺lessInfo.plist值 – 捆绑“”中缺lessInfo.plist键值CFBundleIconName。 在资产目录中提供图标的应用程序还必须提供此Info.plist密钥。 有关更多信息,请参阅http://help.apple.com/xcode/mac/current/#/dev10510b1f7 。 一旦这些问题得到纠正,您可以重新发送更正的二进制文件。 问候,App Store团队 该链接提供了关于资产包的一些信息。 我尝试设置一个CFBundleIconName键项目名称或图像文件名称,并再次提交该应用程序。 不过,我仍然收到与上面相同的电子邮件。 任何build议的帮助将不胜感激。

iOS 11search栏跳转到屏幕顶部

我有一个UITableView,我把它的标题设置为一个search栏。 tableView.tableHeaderView = searchController.searchBar 一切工作按计划,直到你点击它,它似乎从tableView分离并跳转到屏幕的顶部。 tableView行留在原地。 任何理由会在iOS 11而不是iOS 10中做到这一点?

NSDateFormatter和iOS11中的当前语言

看来NSDateFormatter默认行为已经在iOS11中改变了。 此代码用于根据iOS11之前的当前选定的iPhone / iPad语言工作并生成date格式化程序: _dateFormatterInstance = [[NSDateFormatter alloc] init]; _dateFormatterInstance.timeZone = [NSTimeZone systemTimeZone]; 看起来像在iOS11中,我们必须明确指定它的语言环境属性: _dateFormatterInstance = [[NSDateFormatter alloc] init]; _dateFormatterInstance.timeZone = [NSTimeZone systemTimeZone]; _dateFormatterInstance.locale = [NSLocale localeWithLocaleIdentifier:[[NSLocale preferredLanguages] firstObject]]; 有人可以证实我的发现?

尝试从苹果发现错误的示例AVCAM

当我尝试使用Xcode版本9.0testing版5(9M202q)的示例AVCAM迅速。 我发现错误。 架构x86_64的未定义符号: “__T0So22AVCapturePhotoSettingsC12AVFoundation01_abC16SwiftNativeTypesACWP”,引用自:__T05AVCam20CameraViewControllerC12capturePhoto33_F53A4CF98D799BDDCA6C04BA14C549A1LLySo8UIButtonCFyycfU_ CameraViewController.o “__T012AVFoundation39_AVCapturePhotoSettingsSwiftNativeTypesPAAE016availablePreviewc11PixelFormatG0Says6UInt32VGfg”,从引用:在CameraViewController.o LD __T05AVCam20CameraViewControllerC12capturePhoto33_F53A4CF98D799BDDCA6C04BA14C549A1LLySo8UIButtonCFyycfU_:符号(多个)未find架构x86_64的铛:错误:连接器命令,退出代码1失败(使用-v看调用) 问题是什么? 以及如何解决这个问题?

iOS 11 UIBarButtonItem图片没有resize

我的问题的答案暗示在这个问题 ,所以我想答案是禁用我的UIToolbar视图的自动布局。 据说为视图工作的代码是 cButton.translatesAutoresizingMaskIntoConstraints = YES; 但我不知道它是否适用于我的代码,因为UIToolbar不从UIViewinheritance。 我在游戏中使用了很多小图片,这些图片的尺寸取决于设备和方向。 当苹果推出新设备时,我决定先制作一张160×160的图像,然后在使用时重新resize,而不是添加许多不同的图像。 这从iOS 4 – iOS 10很好,但在iOS 11失败。 代码非常简单: // Get the image NSString *pictFile = [[NSBundle mainBundle] pathForResource:@"Correct" ofType:@"png"]; UIImage *imageToDisplay = [UIImage imageWithContentsOfFile:pictFile]; UIImage *cImage = [UIImage imageWithCGImage:imageToDisplay.CGImage scale:[UIScreen mainScreen].scale orientation:imageToDisplay.imageOrientation]; UIButton *cButton = [UIButton buttonWithType:UIButtonTypeCustom]; [cButton setImage:cImage forState:UIControlStateNormal]; [cButton setTitle:@"c" forState:UIControlStateNormal]; //set the frame of […]

为什么页面推动animationTabbar在iPhone X中向上移动

我创build一个应用程序Demo,使用hidesBottomBarWhenPressed隐藏TabBar中的推animation。 但是,当我点击跳转buttonTabbar上移!? 喜欢这个:

自定义背景指示图像和iOS 11

我在我的应用程序中使用自定义后退button。 这个自定义后退button是这样设置的: UINavigationBar.appearance().backIndicatorImage = UIImage(named: "Back").withRenderingMode(.alwaysOriginal) UINavigationBar.appearance().backIndicatorTransitionMaskImage = UIImage(asset: .back).withRenderingMode(.alwaysOriginal) 在iOS 11之前,这段代码实现了这个诀窍,但现在在iOS 11中,button不再是垂直居中了,如下所示: 我可以将后退button图像的高度更改为44,但这会在iOS <11中破坏它。我也可以使用两个不同的图像,但是我正在寻找更干净的东西,例如将图像垂直居中button容器视图。 编辑: 原来,正如banxii1988所说的那样,这个问题是由setBackButtonTitlePositionAdjustment引起的,当值故意将标题移动到可见屏幕之外。 这是一个黑客,以避免在每个视图控制器中删除后退button标题。 我决定删除这个黑客​​,我做了正确的事情是: 将故事板中的后退button项目设置为" " 。 在每个视图控制器没有关联的故事板,我以编程方式设置backBarButtonItem navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil) 请注意,在视图控制器中看到的后退button标题在导航堆栈中的前一个标题中设置。

位置访问 – 应用程序不要求用户访问位置的权限 – iOS 11

描述 应用程序不要求用户访问位置的权限,并获得状态未确定 完美工作,直到iOS-10 var locationManager : CLLocationManager! func getLocationDetails() { locationManager.delegate = self locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager.requestAlwaysAuthorization() locationManager.allowsBackgroundLocationUpdates = true locationManager.startUpdatingLocation() } func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { if status == CLAuthorizationStatus.authorizedAlways || status == CLAuthorizationStatus.authorizedWhenInUse { locationManager.startUpdatingLocation() } } func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { } Plist截图 背景模式