ios8

Property not initialized at super.init call

 ̄綄美尐妖づ 提交于 2019-12-23 05:22:52
问题 I have the following init method in my view controller: init(mainViewController: UIViewController, settingsViewController: UIViewController, gap: Int) { self.mainViewController = mainViewController self.settingsViewController = settingsViewController self.gap = gap self.setupScrollView() // I get error here super.init(nibName: nil, bundle: nil) //and here. } The self.setupScrollView method for now just looks like this: func setupScrollView() { self.scrollView = UIScrollView(frame: CGRectZero)

Core bluetooth ios 8

[亡魂溺海] 提交于 2019-12-23 05:13:55
问题 I use Core Bluetooth to connect two ios devices. Everything is working perfect for ios 7, but for ios 8 no. Device with ios 8 is not visible as peripheral device. Some code: _peripheralManager = [[CBPeripheralManager alloc] initWithDelegate:self queue:nil]; [_peripheralManager startAdvertising:@{CBAdvertisementDataServiceUUIDsKey: @[[CBUUID UUIDWithString:TRANSFER_SERVICE_UUID]]}]; - (void) peripheral:(CBPeripheral *)peripheral didDiscoverServices:(NSError *)error{ if (error) { [self cleanup]

Swift: Scroll View only when a TextField or Button is hidden by the Keyboard

筅森魡賤 提交于 2019-12-23 04:33:40
问题 Below is the code that I'm trying to use to have the view scroll only when the focused textField or UIButton is hidden by the keyboard: import UIKit class ViewController: UIViewController, UITextFieldDelegate { @IBOutlet weak var buttonToBottomConstraint: NSLayoutConstraint! @IBOutlet weak var textFieldUsername: UITextField! @IBOutlet weak var textFieldPassword: UITextField! @IBOutlet weak var scrollView: UIScrollView! override func viewDidLoad() { super.viewDidLoad() NSNotificationCenter

iOS 8 status bar overlay + footer 'bar' in HomeScreen web applications

旧巷老猫 提交于 2019-12-23 04:29:26
问题 When working with a web application after having installed it to 'home', it seems like a most recent update to iOS has caused the usual black status bar to go transparent and float above the web content below it. Also, not pictured, is a horizontal bar at the footer of the app that pushes my fixed footer about 20px up. I don't expect to always be serving this application via iPad (most clients would opt for the lesser expensive Android option), however it is very common for my associates to

Launching photo screen a second time on iOS8 when Calabash iOS is linked

旧时模样 提交于 2019-12-23 04:05:15
问题 Problem with launching photo screen a second time on iOS8 when Calabash-ios is linked. When the user takes a photo in our app, she can save it, but can decide to go back and give it another go at a later time. When the app is built for iOS 8, we see the following behaviour: Taking the first photo works OK, retaking it without leaving the photo screen works fine, as well. But when a photo is saved and the photo screen is launched a second time, the photo preview area - the viewfinder - on the

Return object for a method inside completion block

夙愿已清 提交于 2019-12-23 02:34:45
问题 I want to make a method with URL parameter that returns the response of calling that URL. How can I return the data obtained inside a completion block for a method? class func MakeGetRequest(urlString: String) -> (data: NSData, error: NSError) { let url = NSURL(string: urlString) var dataResponse: NSData var err: NSError let task = NSURLSession.sharedSession().dataTaskWithURL(url!, completionHandler: { (data, response, error) -> Void in //How can I return the data obtained here.... }) task

Did not understand process of initialize in swift programming

安稳与你 提交于 2019-12-23 02:29:39
问题 I am learning Swfit and i start studied from below link https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/ https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Initialization.html I have question regarding Initialization in swift . What i understand is as below 1] It works like a constructor for swift classes. 2] We have to initialize all properties in it. 3] We have to call init() method of super

iOS8 issue when trying to push multiple UIViewControllers in NavigationController

血红的双手。 提交于 2019-12-23 02:21:32
问题 I have 6 UIViewControllers connected with push segues with identifiers and a functionality in my app to 'jump' to the desired UIViewController using this method for stacking ViewControllers: - (void) JumpTo6 { UINavigationController *nav = self.navigationController; UIViewController *a =[self.storyboard instantiateViewControllerWithIdentifier:@"2"]; [nav pushViewController:a animated:NO]; UIViewController *b =[self.storyboard instantiateViewControllerWithIdentifier:@"3"]; [nav

Swift: Missing argument in call to argumentless extension of SequenceOf

吃可爱长大的小学妹 提交于 2019-12-23 01:52:14
问题 Can anybody see light on this bug? The playground insists that argument #2 is missing, but there is no argument #1! The intention of the code to to count the number of runs of a equatable value, and return a sequence of tuples consisting of the values and their counts. I've worked on this code extensively, optimising it and refining it until I'm pretty sure that it should work… but although it compiles, I cannot call it the way it was intended. The error i get from calling the code below is

issue with reentering of view with [UIView(Geometry) _applyISEngineLayoutValues] in iOS8 but not iOS7

我是研究僧i 提交于 2019-12-22 17:53:10
问题 I am working on an app that was started by others and I believe started when iOS 5 was current. Most of the UI is code generated and does not use auto layout and constraints explicitly. However, there are some (later added) self contained UI elements, defined in a nib(xib) that use auto layout internally, which are contained by higher level views from the app (generated in code and not using auto layout). One section of code generates a composite image of one of these self contained elements,