ios11

'hideUISearchBarWhenScrolling'-Property not working with tableView as property

烈酒焚心 提交于 2019-12-11 08:45:58
问题 I played around with the new Swift4/iOS11 possibilities and stuck with the problem that hideSearchBarWhenScrolling isn't working with a tableView as a property in UIViewController. In UITableViewController it's working like it should work. What am I doing wrong? Somebody issued the same problem an has an solution for this? class AddController: UIViewController { let tableView: UITableView = { let tv = UITableView() tv.translatesAutoresizingMaskIntoConstraints = false return tv }() let

Triggering a UITextField unwind segue by pressing Return: Why/How does this work?

情到浓时终转凉″ 提交于 2019-12-11 06:52:26
问题 In my current project I discovered that I could add an unwind segue to a UITextField and trigger the segue by pressing the return key if I also added an action to handle the didEndOnExit event. If the didEndOnExit handler is not connected to the event then the segue is not triggered. I would like to understand this behavior. My interest stems from that there might be something for me to learn about how segues operate. On the other hand, the behavior might just be unique to UITextFields. This

Not able to install my ARKit supported app in iPhone 6, but demo app by apple is running successfully on same iphone

天涯浪子 提交于 2019-12-11 06:11:54
问题 When I try to install ARKit supported app in iPhone 6 its saying requires the “arkit” capability which is not supported by your's iPhone but then how the demo app of ARKit provided by apple is running on the same iPhone. 回答1: I had a similar question, although the purpose was different. I hope this answer helps someone: If you have an iPhone that came out before the iPhone 6S it will not work. However, you can have an app that has ARKit if you remove UIRequiredDeviceCapabilities from the

How can I fix the navigationbar title position in ios11

a 夏天 提交于 2019-12-11 06:06:03
问题 Here is the code [self presentViewController:viewController animated:YES completion:nil]; viewController is a UIImagePickerController When I presented in viewController , navigationbar title shifted. Please check the image. Does anyone know how can I fix it? 回答1: Using the following method to customize and change navigation bar button - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {

A way to calculate or get wifi strength on Swift on iOS 11

↘锁芯ラ 提交于 2019-12-11 05:26:46
问题 Looking for a way to either get or calculate the wifi strength of a device? Have seen examples of scraping the status bar but cannot get it to work on iOS 11: func getSignalStrength() -> Int { let application = UIApplication.shared let statusBarView = application.value(forKey: "statusBar") as! UIView let foregroundView = statusBarView.value(forKey: "foregroundView") as! UIView let foregroundViewSubviews = foregroundView.subviews var dataNetworkItemView:UIView! for subview in

An error was encountered while attempting to communicate with this device

时间秒杀一切 提交于 2019-12-11 05:26:13
问题 I get this error while "Connect via network" option in new version of XCode9 and iOS11. I checked the "Connect via network" box. After few seconds XCode gives me this error: "An error was encountered while attempting to communicate with this device" Anyone facing the same issue? current configuration XCode Version 9.0 beta 5 (9M202q) iOS Beta 5 iPad Air 回答1: I found that error causes when device lost connection for a moment. it's happen when you have damaged (or very old) cable. How ironic...

iOS 11 deferredLocationUpdatesAvailable always return NO and Error Domain=kCLErrorDomain Code=11. How to make deferredlocationupdates work?

泄露秘密 提交于 2019-12-11 05:15:42
问题 I am trying to use allowDeferredLocationUpdates(untilTraveled:timeout:) to defer the location updates. The documentation followed is https://developer.apple.com/documentation/corelocation/cllocationmanager/1620547-allowdeferredlocationupdates. Even though by trying various ways to detach the phone from debugger, keeping phone idle for longer duration the Deferring is not working. Please advice if someone has tried this on iOS 11. 回答1: Unfortunatly, despite of all documentation and after weeks

Alamofire, Extra argument 'method' in call [duplicate]

↘锁芯ラ 提交于 2019-12-11 05:14:12
问题 This question already has answers here : Swift 3.0, Alamofire 4.0 Extra argument 'method' in call (5 answers) Closed 8 months ago . I have google some answers with no luck, I got this error "Extra argument 'method' in call" and is pointing at the ".get", but if i remove the "headers : headers as? [String: Any]" it works. Please help let urlParams:[String : Any] = [ "target": target, "q": textToTranslate, "key": GOOGLE_CLOUD_API_KEY, "source": source] let headers:[String : Any] = ["Content

Can't run app in iOS 11.0 simulator

我怕爱的太早我们不能终老 提交于 2019-12-11 04:51:15
问题 I can't run the application on the simulator in the new xCode 9 beta 3 (9M174d). Every time I see the error message: (Mach error -308 - (ipc / mig) server died) 回答1: Had this issue after installing XCode 9 beta 4. Tried every possible suggestion. The only thing that solved this issue for me was to reinstall Xcode command line tools: Open terminal and type the command: xcode-select --install After installation reboot the mac. 回答2: The problem is fixed after installing the latest Mac Os Sierra

DepthData - Get per-pixel depth data (CVPixelBuffer data analysis)

血红的双手。 提交于 2019-12-11 00:19:00
问题 Now I run AVDepthPhotoFilter that Rendering Depth Deta from a stereo camera of iPhone7Plus. So, I want to access per-pixel depth data, but, I don’t know how to do it. Please advice. 回答1: How to get DepthData and analysis CVPixelBuffer data You need to make sure your AVCapturePhotoSettings() has isDepthDataDeliveryEnabled = true You have to use the function func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) func photoOutput(_ output: