ios11

How to enable UIDragInteraction on Custom UIViews for iPhone

你离开我真会死。 提交于 2019-12-13 15:18:07
问题 I've been trying to use Apple's new API to enable Drag interactions on Custom UIViews. I've managed to make it work when testing using iPad, but when I run the same app in my iPhone 7 - ios 11 beta 3, I'm not able to drag my custom UIViews. I've noticed that we need to enable drag interaction when using in UICollectionView and UITableViews collectionView.dragInteractionEnabled = true tableView.dragInteractionEnabled = true but I can't manage to find anything in the documentation or anywhere

UIImage view is not showing in iOS 11…How to solve?

自闭症网瘾萝莉.ら 提交于 2019-12-13 10:21:56
问题 I have an existing project in iOS, it was working fine with till iOS 10 , After updating X-Code 9 , and run the project iOS 10 it is fine but in iOS 11 the UIImageview is not showing .. I have already tried so many ways like clean derived data, reset clean build with quit x-code and restart system, remove and add image(png file), but noting happen. Even i have added the background colour but the colour is also not showing in the device and simulator but it is in the storyboard . one more

How to set large title on navigation bar for iOS 11?

时光总嘲笑我的痴心妄想 提交于 2019-12-13 08:57:56
问题 I am creating app for iOS 11 or later, requirement to set the large title on left side of navigation bar. Please someone help to sort out how to set and it should work only for iOS 11 or later. Give me some other suggestions to maintain this feature available through out app (which support iOS 8 or later). Thanks in advance. 回答1: Here is code snippet to display large title on left side of navigation bar for iOS 11 or later. Objective C: self.title = @"Your title"; if (@available(iOS 11, *)) {

Unable to import in CoreNFC in swift project Xcode 9 beta

▼魔方 西西 提交于 2019-12-13 08:31:49
问题 I am unable to import CoreNFC in a swift project. Getting this error No such module CoreNFC . I also added the framework to Linked Frameworks and Libraries . 回答1: According to a post on the Apple Developer forums, you can only build for a real device or the Generic iOS device as there is no x86 version of CoreNFC. Once you switch to one of these, you do not need to add CoreNFC to Linked Frameworks and Libraries , just @import it: @import CoreNFC; 来源: https://stackoverflow.com/questions

MFMessageComposer cancel button not visible in iOS 11

老子叫甜甜 提交于 2019-12-13 05:31:48
问题 The cancel button on right top corner after a message composer has been presented is not visible in iOS 11 devices. As shown in the screenshot, cancel button works but is not visible. Once we press on it, the screen dismisses. 回答1: I have tried like this: class ViewController: UIViewController, MFMessageComposeViewControllerDelegate { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func

Cannot connect to any HTTPS url on iOS 11 simulator

早过忘川 提交于 2019-12-13 03:58:15
问题 Going to https://google.com results in the screen below. This is an iOS 11.0.1 simulator, and I'm using Xcode 9.0.1 I've tried multiple HTTPS urls, and none have worked. I've tried these fixes, to no avail: Restart the simulator Hardware > Erase All Content and Settings The date/time of the simulator is correct. 回答1: After trying an iOS 8.4 simulator, I noticed the simulator had no internet connection. With a quick Google search, I found that Avast antivirus has a "Web Shield" feature that is

Open a view controller from a local notification in ios 11

寵の児 提交于 2019-12-13 03:56:35
问题 I have an ios 11 app that uses local push notifications for remainders at a given time. The local notifications work and when swiped they open up the main view of my app. My app's main view is a uitableviewcontroller. The reminders are rows in the table view. If you click on a reminder it open's a new view controller by self.presentview... The new view pops up over the table view. I am not using storyboards or xib files and doing it programmatically. How do I pass the reminder id to the push

self signed certificate error with signalr - Error during negotiation request iOS

梦想的初衷 提交于 2019-12-13 03:53:58
问题 Error: Optional(["message": Error during negotiation request.]) I'm getting the error while connection signalr server, I think there is an issue with server side as they used self signed certificate. How I can fix by client side(swift),how to enable in iOS 11 to work with self signed certificate? For the signer library. Below is the my code: func test() { let persistentConnection = SignalR("http://services.test.com/signalr", connectionType: .persistent) let simpleHub1 = Hub("testHub")

Navigation bar title view missing in iOS11

三世轮回 提交于 2019-12-13 03:49:52
问题 I'm working on a project in swift for iPad . Have placed an image view in Navigation bar title view from story board. The title view is displaying as expected in iOS 10 and below. The same project when i run in iOS 11 simulators and the physical devices Navigation bar is not showing the title view , any leads would be appreciated. 回答1: Create a custom view and override below method in the custom title view class to update view frame size at runtime. Obj-C -(CGSize)intrinsicContentSize {

How to initialize a MLMultiArray in CoreML

淺唱寂寞╮ 提交于 2019-12-12 16:25:08
问题 I've got an array of 40 arrays with 12 double features, so the type is [[double]]. Currently I'm sending this data to Google Cloud ML API to get a related prediction. Since Apple recently introduced CoreML and coremltools, I converted my model from keras to .mlmodel to avoid thousand of google cloud api calls and do inference directly on my iPhone: coreml_model = coremltools.converters.keras.convert(new_Model, input_names=['accelerations'], output_names=['scores']) coreml_model.save(