xcode8

AFURLSessionManager when my ViewController was navigated app crashed

谁说我不能喝 提交于 2019-12-24 07:07:42
问题 I have problem in AFURLSessionManager for Objective-C iOS. I have 2 viewController and use AFURLSessionManager for getData from server. when user navigate to viewContoller2 that have AFURLSessionManager request and user has very bad network and press back button, AFURLSessionManager want to call delegate, crashed and show EXC_BAD_ACCESS(code=EXC_I386_GPFLT) when i navigate to a viewController, AFURLSessionManager task finish late and viewController was changed by user and AFURLSessionManager

Xcode 8 CoreGraphics issue with iPhone 7 (running iOS 10)

无人久伴 提交于 2019-12-24 05:45:16
问题 I'm using an iPhone 7 running iOS 10 (doesn't appear to matter which version of iOS 10, but it has to be an iPhone 7 device...even an iPhone 6s with the same version of iOS 10 doesn't have this issue). Unfortunately, I don't have the ability to try an iPhone 7 running iOS 9 or below. In my app, I'm using this method to mask an image with another image: - (UIImage *)imageWithMask:(UIImage *)maskImage { UIImage *returnImage = nil; CGImageRef maskRef = maskImage.CGImage; CGImageRef mask =

Value of type 'CustomButton' has no member 'touchDown'

拥有回忆 提交于 2019-12-24 05:45:11
问题 I have created custom button class and override all touches methods. It works fine in swift 2 and Xcode 7.3.1 . But when I open same app in Xcode 8.0 , it will show errors : Value of type 'CustomButton' has no member 'touchDown' Value of type 'CustomButton' has no member 'touchUpInside' Value of type 'CustomButton' has no member 'touchDragExit' Value of type 'CustomButton' has no member 'touchDragEnter' Value of type 'CustomButton' has no member 'touchCancel' Here is my code : import UIKit

Migrating from Swift 2.3 to Swift 3 with dependencies

痴心易碎 提交于 2019-12-24 03:59:13
问题 I am working on migrating my project from Swift 2.3 to Swift 3 but am having issues with 3rd party frameworks that I use via Cocoapods. Many of them have already upgraded to Swift 3, yet some of them haven't. When I build my project, I get the error: Module compiled with Swift 2.3 cannot be imported in Swift 3.0: [...] I have read answers such as this one and this one, however they do not solve my problem. I cannot set SWIFT_VERSION to 2.3 if my project actually is using Swift 3, neither can

Linker command failed with exit code 1 (use -v to see invocation) with Swift 3

老子叫甜甜 提交于 2019-12-24 03:11:08
问题 I am working on building a Swift library and am hosting it on GitHub. All was going fine until I added BluetoothKit to the project. I then got an Apple Mach-O Linker Error: ld: warning: directory not found for option '-F/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk/Developer/Library/Frameworks' ld: /Users/calebklevetertest/Library/Developer/Xcode/DerivedData/Napalm-dblvhbjdwovurocsvzrzaxzkjjyw/Build/Products/Debug

UICollectionView deselectItem when cell pre-fetching is enabled

有些话、适合烂在心里 提交于 2019-12-24 02:17:31
问题 On iOS 10.0, UICollectionView pre-fetches cells by default. This leads to cells that are prepared for being shown on screen, but are hidden. This question describes it really well. The following code will successfully deselect an index path when its cell is either visible or does not exist at all. If the cell exists and is hidden, the index path will be deselected, but the cell becomes stuck in the selected state until it is reused. collectionView!.deselectItem(at: indexPath, animated: false)

Swift: Prepare for segue not passing data

女生的网名这么多〃 提交于 2019-12-24 01:53:42
问题 I have got a collection view inside a table view (Netflix App Style). I followed this tutorial: https://www.thorntech.com/2016/01/scrolling-in-two-directions-like-netflix-part-2-making-api-calls/ Now I want to implement a function that whenever I click on a collection view, it will pass the employee's name to the next view controller. Here is my code: import UIKit class CategoryRow: UITableViewCell, UICollectionViewDataSource { @IBOutlet weak var collectionView: UICollectionView! var jobpost

How to align UILabel Horizontally with the profile photo image?

拈花ヽ惹草 提交于 2019-12-24 00:38:55
问题 I have to show the Name and EmailID aligned horizontally properly with the Profile Image . So that the Name and email ID appears exactlybat the center of the UIImageView. But you can see the name and email id are not in centre with the profile image. Why is this happening? I have given the following constraints: 回答1: Remove leading and trailing Constrain and set align center x to imageView. You can also set leading and trailing Constrain. but both are equal as follow. 回答2: Just control+drag

GTMSessionFetcher.framework: No such file or directory

 ̄綄美尐妖づ 提交于 2019-12-24 00:21:53
问题 As soon as I install cocoapods, the error comes up. Before that there is no trace of the error. Below is a screenshot of the error in the Debug console: Debug Console What I have tried: Uninstalling and reinstalling cocoapods uninstalling and reinstalling all pods starting the project from scratch all over again I am using the xcworkspace file, not the xcodeproj file Updated all pods. Deleted Derived data folder did a clean and a computer restart after each of these steps. Podfile:

UIButton is not clickable after first click

我的未来我决定 提交于 2019-12-24 00:12:34
问题 I am trying to bring a subview from bottom when button is clicked. But only for the first time the button is clickable. For second click after animation button is not clickable. Here is the code. class AnimateView: UIView { var button: UIButton! var menuView: UIView! var mainView: UIView! override init(frame: CGRect) { super.init(frame: frame) mainView = UIView(frame: CGRect(x: 0, y: 0, width: self.frame.size.width, height: self.frame.size.height)) mainView.clipsToBounds = true mainView