xcode9

Get same graphic output under Xcode 10 as under Xcode 9?

依然范特西╮ 提交于 2019-12-13 06:33:37
问题 I build the SheepShaver emulator (which, in its current version, uses SDL2 to create and display its window) for use in macOS. When I build under Xcode 9, the fonts and graphics are sharp and clear; when I build under Xcode 10 (on the same MacBook Pro running Mojave), the fonts and graphics are slightly fuzzy. I use exactly the same code when building on both Xcode versions. Is there a setting in Xcode 10 that will produce the same visual output that Xcode 9 produces? I've already got the

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

Swift 4 show/hide button based on picker view selection

假装没事ソ 提交于 2019-12-13 03:42:39
问题 So, I'm making an app that after having the user select their level of education from a picker view and if they select college education a number of buttons are supposed to appear saying 'associates degree' 'bachelor's degree' and 'master's degree'. I know I need to make an if statement like this: func pickerView(pickerView: UIPickerView, row: Int, forComponent component: Int) -> String! { if educationLabel.text == educationLevel { return education[row] If row = "College Graduate" //Hidden

How to remove blur view for particular cell?

江枫思渺然 提交于 2019-12-13 03:14:41
问题 I am using UITabBarController & UITableView My goal is to remove blur view for particular cell. Yes there is a way to add/remove UIBlurEffect to all the cell & bottom-Tabbbar But of-course don't want this at all . For reference i am attaching screenshot 回答1: What you are asking is to add Blur view to full screen except target cell. as tableivew resues cell so you have only option left is You can take screenshot of particular cell Here is code sample Swift 3 - How to take a screenshot of

Why Am I Not Able To Embed My Custom Framework?

百般思念 提交于 2019-12-13 02:58:41
问题 I have a very simple framework project, MyFramework, that builds successfully. The framework defines a single, global function, myFunction. The framework also defines 2 global variables: MyFrameworkVersionNumber and MyFrameworkVersionString (These 2 variables were created for me by Xcode) I have a very simple application project, MyApplication. I am adding the framework to the application project by dragging and dropping the framework package (i.e. the MyFramework.framework in DerivedData

Compiler segmentation fault while using Set in Swift

爷,独闯天下 提交于 2019-12-12 18:34:16
问题 This code works fine: let lines = ["one", "one", "two"] let lineSet = lines but while compiling this one: let lines = ["one", "one", "two"] let lineSet = Set(lines) I'm getting: Command failed due to signal: Segmentation fault: 11 I've got Xcode Version 9.0 (9A235). Is this is really a bug or am I just doing something wrong? My workaround for now: var lineSet = Set<String>() let lines = ["one", "one", "two"] lines.forEach { lineSet.insert($0) } 回答1: A better, more idiomatic way to construct

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(

Simultaneous accesses to 0x10f10df48, but modification requires exclusive access

若如初见. 提交于 2019-12-12 13:09:08
问题 I'm working on swift4 migration and this warning (that make my app very slow) appears. Simultaneous accesses to 0x10f10df48, but modification requires exclusive access. on line else if (context == &KVOContext && keyPath == contentSizeKeyPath && object as? UIScrollView == scrollView) { Can't found how to solve it. 回答1: https://github.com/apple/swift-evolution/blob/master/proposals/0176-enforce-exclusive-access-to-memory.md In this link you can see the conflict of &KVOContext like this: //

Existing app crashes on startup on iPhone X Simulator

时光毁灭记忆、已成空白 提交于 2019-12-12 12:29:50
问题 I have an existing app, that crashes on launch, when running on iPhone X Simulator. (Breakpoint stops on the main.m files). The app runs fine on iPhone 8 simulator, so it has something to with iPhone X. Also, it has something to do with the status bar, since the stack shows something with [UIStatusbar _prepareForVisualProviderIfNeeded] before the crash. Do I need to do something with status bar to run this app on iPhone X Simulator? 回答1: Found the answer here: All exception break point is

XCode 9 crash on label localizer comment edition

回眸只為那壹抹淺笑 提交于 2019-12-12 11:13:03
问题 Context : Xcode 9.0 (9A235) When I try to edit my storyboard label's note for localizers (inserting Barty Crouch tag #bc-ignore! ), XCode 9 crashes. Also, trying to edit the font does nothing. Seems like a corrupted storyboard to me, certainly after a merge. Does anyone face the same issue ? EDIT, non-ambiguous question : Is there a fix to avoid the crash or do I have to edit the storyboard by hand? Process: Xcode [66619] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com