ios10

Today Extension compact mode height in iOS 10

此生再无相见时 提交于 2019-12-20 17:41:01
问题 I am struggling to change the height of my iOS 10 widget in compact mode. All I have is an empty widget, no views inside it. Still, no matter what I set for the compact height, it seems to ignore it. Here is my code: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. [self.extensionContext setWidgetLargestAvailableDisplayMode:NCWidgetDisplayModeExpanded]; } - (void)widgetActiveDisplayModeDidChange:(NCWidgetDisplayMode)activeDisplayMode

Detecting GSM Call States in IOS 10 (Swift 3, Xcode 8) and Notification from Background state

梦想的初衷 提交于 2019-12-20 12:38:27
问题 TLDR: Detect call end event from background Please see update to the question below: Is it possible to detect/get an event for call state in IOS 10 using Swift from background state . In the earlier versions there was a CORE Telephony api but this seems to be deprecated now. I have seen the CallKit Api but it says that it is for VOIP based calls. I need to get the state of normal CDMA/GSM calls, not VOIP based calls and when the call ends just fire a notification to server. I do not need to

iTunes software service authentication error domain error 434

心已入冬 提交于 2019-12-20 10:58:46
问题 I am uploading iPhone application using latest xCode 8. I have good internet connection and all the relevant settings set up at iTunes connect. My distribution profiles are also set up correctly. I am facing below error:- iTunes software service authentication error domain error 434 回答1: So this has what worked for me: Preface: 4 days of debugging, recreated certificates numerous times, nothing worked, every time i try to validate/upload via Xcode it says same error "iTunes software service

UIPickerView selection indicator not visible in iOS10

爱⌒轻易说出口 提交于 2019-12-20 10:46:31
问题 I build my project in Xcode 8. UIPickerView separator lines are not visible in iOS 10 simulator and the devices, but works fine on iOS 9.3 devices and simulator. I tried to adjust the UIPickerView back ground color, auto layouts and everything possible in the XIB, but nothing works. Anyone have an idea on this? This is a custom view which contains a UIPickerView -(void)layoutSubviews{ isShown = NO; [super layoutSubviews]; //self.selectedDic = nil; self.doneBtn.tintColor = COLOR_DB3535; self

Core Data Codegen fail in Xcode 8

℡╲_俬逩灬. 提交于 2019-12-20 10:32:47
问题 I have an iOS app containing a Core Data model with 6 entities. The entity Name is set up as follows: Class Name: Name Module: Current Product Module Codeine: Class Definition (all 5 other entities are set up similarly). Problem 1 (fixed itself but leaving for posterity) Code IS generated in the derived data folder… not as ~class definitions as expected, but as extensions instead (named like Name+CoreDataProperties.swift . It doesn't seem to matter whether the Codegen is set to Class

Core Data viewContext not receiving updates from newBackgroundContext() with NSFetchedResultsController

安稳与你 提交于 2019-12-20 08:35:53
问题 In my application, I have a NSFetchedResultsController to load Core Data objects in a UITableView. The fetch request associated with this FRC uses the new viewContext property available for the NSPersistentContainer (iOS10). When I select a cell, I pass the Core Data object to a new ViewController. This new VC still uses the viewContext. From this ViewController, I can update the Core Data object from ViewControllers presented modally. To do so, I use newBackgroundContext() for the modal

Difficulties converting to Swift 3

二次信任 提交于 2019-12-20 08:30:09
问题 After converting from Swift 2 to Swift 3 (even after converting edit-> convert -> to current swift syntax) I am getting lots of errors. Especially: I am shown total 90 errors for my project which was working fine in Swift 2 before i downloaded this beta Xcode 8.0 and converted to Swift 3 Is this a conversion mistake I am making? 回答1: Most of them are easy fixes, simply by tapping the red button, and having Xcode fix it for you! Others include: CGRect Swift 2: let frame = CGRectMake(0, 0, 20,

How to check for value in Firebase that is held under a autoID child?

微笑、不失礼 提交于 2019-12-20 07:26:59
问题 Upon the tap of a delete button. I am trying to delete a particular child out of my Firebase database. My problem is that I am unable to refer to the particular childByAutoId in my database therefore my application does not know what child to remove. Firebase Database DataServices File import Foundation import Firebase import UIKit let DB_BASE = FIRDatabase.database().reference().child("laboratory") //contains the root of our database let STORAGE_BASE = FIRStorage.storage().reference() class

How to restrict button click

戏子无情 提交于 2019-12-20 05:38:12
问题 I have a VC like this for the checkBoxes i have embedded UIButtons and i am changing their image on click. Here's my code @IBOutlet weak var bestSellerButton: UIButton! @IBOutlet weak var trendingButton: UIButton! @IBOutlet weak var lowToHighButton: UIButton! @IBOutlet weak var highToLowButton: UIButton! var isBoxClicked = Bool() func updateCheckImageOnClick(button: UIButton) { if isBoxClicked == true { isBoxClicked = false button.setImage(UIImage.init(named: "checkmark"), for: UIControlState

NSManagedObject subclasses duplicate declaration

家住魔仙堡 提交于 2019-12-20 04:09:22
问题 So, when my data model is ready, I tried to generate the subclasses when my data model file is open: Editor -> Create NSManaged Object Subclasses Okay, two files are generated, one is class declaration, the other is the property. However, I was immediately prompted that I did a redeclaration of a class that already exists. This is where the original generated files are: previously generated files My question is obvious: When were those two files generated? What to do if I want those files in