ios9

iOS9系列专题6——iOS9其他适配注意点

血红的双手。 提交于 2019-11-29 16:50:11
iOS9适配注意点 一、后台定位类app适配点 在iOS8中,APP的定位服务apple就做了一些修改,需要用户申请相应的权限,并在info.plist文件中添加对应的键值。具体的做法在这篇博客中有详细的讲解: http://my.oschina.net/u/2340880/blog/414760 。 在iOS9系统中,定位服务的做法基本没有改变,对于前台的定位没有影响,但app中如果需要后台定位,那么还需要多做一些操作,例如: manager = [[CLLocationManager alloc]init]; //申请后台定位权限 [manager requestAlwaysAuthorization]; manager.delegate=self; //======================================= //下面这个是iOS9中新增的方法 开启后台定位 manager.allowsBackgroundLocationUpdates = YES; //====================================== [manager startUpdatingLocation]; 通过上面简单的配置直接运行的话,程序会崩溃掉,还需要在plist文件中做一些配置,两种方式: 方式一:直接在plist文件中配置如下: 方式二:在项目中设置

CLLocationManager in iOS9 giving incorrect locations (iOS8 is OK)

不羁岁月 提交于 2019-11-29 16:30:46
问题 We experience some weird issues on the locations from CCLocationManager starting from iOS9. iOS 7-8 has no issues. The weird locations cause errors in the app. The app is used while driving a car and we have about 50 test users in TestFlight and some of them are reporting these issues. The app reacts on location updates, each location update, each 25m and each 50m there is something to do. For test I've stored all these locations in an array. Our test users have a button which will send the

UIAlertController tint color defaults to blue on highlight

时间秒杀一切 提交于 2019-11-29 15:58:42
问题 I'm use the following code to present a UIAlertController action sheet with the item text as red. I've used the tint property to set the color. UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; alertController.view.tintColor = [UIColor redColor]; The text color seems to be defaulting to blue on highlight or selection. Is this normal and how do I stop this? 回答1: This is a known Bug, see https:/

iOS: Dynamic Height For UITableViewCell

一个人想着一个人 提交于 2019-11-29 15:11:12
I'm using iOS9 XCode7 I need to change the height of cell Dynamically according to labelText Height I have used: self.tableView.rowHeight=UITableViewAutomaticDimension; But it is not working for custom made cell. sizetoFit is removed in iOS9. Please suggest something. Thanks Give your label constrains relative to the cell, top, bottom, left and right. Than your cell size will grow with the content height. also make your label multiline.(by setting Lines property to 0 in attribute inspector) #pragma mark- Menu table Delegates -(CGFloat)tableView:(UITableView *)tableView

How to support iOs 9 feature(s), while keeping iOs 8 support?

走远了吗. 提交于 2019-11-29 15:10:24
Basically the question is in the title. I'm sure there's a way to ship your app to an earlier version of iOs (8 in this case), while still being able to use an exclusive feature of a newer OS version. Example: My app has a minimum support of iOs 8.3, and with the latest release of iOs 9, I wanna add support to force touch (which is only available in iOs 9), but in the same time, I want to be able to fix bugs and do UI improvements for example and ship the update to both versions. Major apps do this, fb for example, so there MUST be a way, but I couldn't find it anywhere, I'm giving up :( EDIT

NSAttributedString performance is worse under iOS 8

旧街凉风 提交于 2019-11-29 15:05:18
问题 Under iOS 8 (and 8.1 beta) the performance of creating an NSAttributedString is much worse than 7 (2-3x). This is especially noticeable if you're using multiple instances on the same view, loading 4 different labels will cause a delay of over a second from when the user taps and the new view appears. Unfortunately you can't even throw this into another thread, since it uses WebKit behind the scenes. I have submitted a bug to Apple, but I need ideas on workarounds or a better implementation

UITapGestureRecognizer not working on iOS9

与世无争的帅哥 提交于 2019-11-29 14:44:48
I have an application which uses UITapGestureRecognizers which seem to not work in iOS9 Beta 2. They are successfully calling - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { NSLog(@"shouldReceiveTouch"); return YES; } but it doesn't hit any of the other UITapGesture delegate methods. When I run the same application (from Xcode 7) on a device running on iOS 8, it works as expected. Has anyone else hit this? Here is how I initialise the UITapGestureRecognizer. Edit If I create the UITapGestureRecognizer in code instead of in the

angular routing on ios9 $rootScope:infdig error

匆匆过客 提交于 2019-11-29 14:21:03
问题 Routing in angular app that worked in ios8, produces a [$rootScope:infdig] error in ios9. I have tried both ngRoute and ui.router but the result is the same. Error: [$rootScope:infdig] http://errors.angularjs.org/1.4.3/$rootScope/infdig?p0=10&p1=%5B%5D Any solution to this? 回答1: Even though this is marked as a duplicate of this question. This is the best way to resolve this issue. ionic app iOS 9 problems [$rootScope:infdig] 10 $digest() iterations reached The selected answer in this post

enumerate is unavailable call the enumerate method on the sequence [duplicate]

女生的网名这么多〃 提交于 2019-11-29 13:45:27
This question already has an answer here: Swift 2.0 : 'enumerate' is unavailable: call the 'enumerate()' method on the sequence 3 answers Just downloaded Xcode 7 Beta, and come up with this error on enumerate error: enumerate is unavailable call the enumerate method on the sequence func layoutSpecialKeysRow(row: [Key], keyWidth: CGFloat, gapWidth: CGFloat, leftSideRatio: CGFloat, rightSideRatio: CGFloat, micButtonRatio: CGFloat, isLandscape: Bool, frame: CGRect) -> [CGRect] { var frames = [CGRect]() var keysBeforeSpace = 0 var keysAfterSpace = 0 var reachedSpace = false for _k, key) in

MPMoviePlayer in iOS 9

不羁的心 提交于 2019-11-29 13:05:23
i have made a function in iOS 8 to play a movie in the background and now when i want to use it in iOS 9 it gives me a warning and says that it best not to use MPMoviePlayer and instead use AVPlayer. but i don't know anything about AVPlayer. how can i convert this to a proper function without warning that uses AVPlayer instead of MPMoviePlayer? heres the func : func playVideo() ->Bool { let path = NSBundle.mainBundle().pathForResource("video", ofType:"mov") //take path of video let url = NSURL.fileURLWithPath(path!) moviePlayer = MPMoviePlayerController(contentURL: url) //asigning video to