xcode7

Adding GIF Background to viewController with Swift

守給你的承諾、 提交于 2021-02-07 04:36:17
问题 I wanted to add GIF Background to my landing screen with swift, so I found this code online but when I try to use it on XCODE 7 with Swift 2.0 import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() var filePath = NSBundle.mainBundle().pathForResource("videoName", ofType: "gif") var gif = NSData(contentsOfFile: filePath!) var webViewBG = UIWebView(frame: self.view.frame) webViewBG.loadData(gif, MIMEType: "image/gif", textEncodingName: nil,

Xcode UI Testing Error keyboard

假如想象 提交于 2021-01-31 07:27:09
问题 XCUIApplication *app = [[XCUIApplication alloc] init]; [app.buttons[@"Committee"] tap]; [app.buttons[@"Login"] tap]; [app.buttons[@"Add Presenter"] tap]; XCUIElement *nameTextField = app/*@START_MENU_TOKEN@*/.textFields[@"Name"]/*[[".scrollViews.textFields[@\"Name\"]",".textFields[@\"Name\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/; [nameTextField tap]; [nameTextField typeText:@"A"]; XCUIElement *topicTextField = app/*@START_MENU_TOKEN@*/.textFields[@"Topic"]/*[[".scrollViews.textFields[@\

Xcode UI Testing Error keyboard

こ雲淡風輕ζ 提交于 2021-01-31 07:23:47
问题 XCUIApplication *app = [[XCUIApplication alloc] init]; [app.buttons[@"Committee"] tap]; [app.buttons[@"Login"] tap]; [app.buttons[@"Add Presenter"] tap]; XCUIElement *nameTextField = app/*@START_MENU_TOKEN@*/.textFields[@"Name"]/*[[".scrollViews.textFields[@\"Name\"]",".textFields[@\"Name\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/; [nameTextField tap]; [nameTextField typeText:@"A"]; XCUIElement *topicTextField = app/*@START_MENU_TOKEN@*/.textFields[@"Topic"]/*[[".scrollViews.textFields[@\

Instance member cannot be use on type

帅比萌擦擦* 提交于 2021-01-29 04:03:59
问题 @IBAction func saveDetails(sender: AnyObject) { Person.firstName = firstNameTF.text Person.lastName = lastNameTF.text } Above is the function I am trying to implement and below is the class I am trying to create an instance of and store the data from my text fields in... I am getting the error "Instance member "firstName" cannot be used on type Person". I was almost positive that my class was setup and initialised properly so I can't see what the problem could be? class Person { var firstName

Property is unable to set to nil via weak reference [duplicate]

安稳与你 提交于 2021-01-29 03:56:58
问题 This question already has answers here : Weak references in Swift playground don't work as expected (5 answers) Closed 4 years ago . The following code defines Person and Apartment . Person instance may own an Apartment , Apartment may have a tenant( Person instance) class Person { let name: String init(name: String) { self.name = name } var apartment: Apartment? deinit { print("\(name) is being deinitialized") } } class Apartment { let unit: String init(unit: String) { self.unit = unit }

ld: -bundle and -bitcode_bundle cannot be used together

空扰寡人 提交于 2021-01-27 04:51:32
问题 i'm building llvm/clang 3.7 with bitcode support ( -fembed-bitcode ). Some modules can't be linked due to error: ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together clang: error: linker command failed with exit code 1 (use -v to see invocation) Full error output: Linking CXX shared module ../../lib/BugpointPasses.dylib cd /Volumes/Transcend/dev/src/llvm_37_ios_any_build/tools/bugpoint-passes && /usr/local/Cellar/cmake/2.8.12.2/bin/cmake -E cmake_link

ld: -bundle and -bitcode_bundle cannot be used together

北城余情 提交于 2021-01-27 04:51:28
问题 i'm building llvm/clang 3.7 with bitcode support ( -fembed-bitcode ). Some modules can't be linked due to error: ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together clang: error: linker command failed with exit code 1 (use -v to see invocation) Full error output: Linking CXX shared module ../../lib/BugpointPasses.dylib cd /Volumes/Transcend/dev/src/llvm_37_ios_any_build/tools/bugpoint-passes && /usr/local/Cellar/cmake/2.8.12.2/bin/cmake -E cmake_link

Value of type 'AppDelegate' has no member 'window'

元气小坏坏 提交于 2021-01-26 19:09:56
问题 Im trying to use the 3D touch Quick Actions and I'm setting it up copying VEA Software code. In his sample code it works perfectly but when I try to add it to my app I get some unusual errors. I am new to coding and swift so please explain as much as possible. Thanks. Below I have the code which is in my app delegate. This is where I'm getting the error ( self.window? ): @available(iOS 9.0, *) func handleShortcutItem(shortcutItem: UIApplicationShortcutItem) -> Bool { var handled = false var

Value of type 'AppDelegate' has no member 'window'

て烟熏妆下的殇ゞ 提交于 2021-01-26 19:09:19
问题 Im trying to use the 3D touch Quick Actions and I'm setting it up copying VEA Software code. In his sample code it works perfectly but when I try to add it to my app I get some unusual errors. I am new to coding and swift so please explain as much as possible. Thanks. Below I have the code which is in my app delegate. This is where I'm getting the error ( self.window? ): @available(iOS 9.0, *) func handleShortcutItem(shortcutItem: UIApplicationShortcutItem) -> Bool { var handled = false var

在Xcode7 里编写运行 Python 代码

我们两清 提交于 2021-01-10 04:34:08
查看 Python版本 $ python -V Python 3.5.1 【我这里以Python3.5.1为例,系统自带的是2.x,如果自己需要安装3.x】 安装方法:参考前面几篇博客 http://my.oschina.net/u/868062/blog/631185 http://my.oschina.net/u/868062/blog/632555 http://my.oschina.net/u/868062/blog/631173 在Xcode下编写运行Python文件 Xcode 环境配置 打开Xcode ,选择 File > New > New Project ,或按下 Shift + Command + N ,然后选择最下面的 Other 其它选项卡,并选择 [ External Build System ] ,继续下一步 完成后,在左上角的项目图表上点击一下,选择 [ Edit Scheme ] 默认配置如下 修改配置【 executable 】可执行文件 其他的默认即可 配置好了,接下来创建一个python文件,抒写代码 在项目中 New-->File-->Other-Empty 创建一个空文件 命名为 main.py 接下来再次 Edit Schem--> Arguments 把main.py添加的文件添加到 Arguments Passed On Launch