xcode7

Pass Parameter with UITapGestureRecognizer

做~自己de王妃 提交于 2020-01-22 17:33:06
问题 Is there any way i can pass parameters with UITapGestureRecognizer? I've seen this answered for objective-c but couldn't find an answer for swift test.userInteractionEnabled = true let tapRecognizer = UITapGestureRecognizer(target: self, action: Selector("imageTapped4:")) // Something like text.myParamater test.addGestureRecognizer(tapRecognizer) And then receive myParameter under func imageTapped4(){} 回答1: One approach would be to subclass UITapGestureRecognizer and then set a property, I've

Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer - ios

纵然是瞬间 提交于 2020-01-21 10:59:28
问题 I am developing ios app by using swift. I am using xcode7.0.1. with TableViewController. I want to expand when i click row and collapse when i click it again. I am following the tutorial from gitHub. Now i am facing the error Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer for the key path "frame" from <X.expandTips 0x145d8d20> because it is not registered as an observer.' I hope following line of code will causing the issue. My UITableViewCell

Upgrade Xcode 7.3.1 Project to Xcode 8.0

拜拜、爱过 提交于 2020-01-17 18:02:29
问题 I want to upgrade my Xcode 7.3.1 Project to Xcode 8. My project was written in swift 2.2 in Xcode 7 but now I want to upgrade to Xcode 8 with swift 3.0. My project contains some pod-files library while upgrading to Xcode 8, I am facing lots of warning and error. Warning related to storyboard is solved but Error in pod files are not solved. Xcode tell me to convert swift syntax to latest syntax so I did it. Swift syntax error shows in pod-files. I am trying to solve pod file swift syntax error

UIViewController hangs in Xcode 7

好久不见. 提交于 2020-01-17 02:19:10
问题 Not sure whether title is correct or not, I'm calling newViewController on button click but it is not rendering that. as it was working fine in Xcode 6.4 but in Xcode 7 its hangs the UI and not showing new view controller after pushViewController. this is the error logs which print on console Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you

Create Multi-Page PDF from other PDFs

旧时模样 提交于 2020-01-17 00:47:09
问题 I've previously posted a related question on SO, but to no avail. I then changed my approach and created PDFs which all have the exact same dimensions, etc. All these PDFs also consists of one page only. Now I would like to combine these single page PDFs into one multi-page PDF. From here I think I've figured what the steps are in creating the multi-page PDF. After running the code below, a PDF with the expected file name is created, but the PDF consists of only one page, and it is entirely

Why In iOS 9 and Xcode 7 not show full view height and width in iPhone 6 and above?

自作多情 提交于 2020-01-15 08:55:28
问题 I am using iOS 9 and Xcode 7 ....and I make new app without storyboard and use auto layout and use size classes.....basically I am using xib with resizing feature and use code to check device . When I was using xcode 6.4 and iOS 8 then my code work for each device . But when I use Xcode 7 and iOS 9 then screen not show full on device this is only for iPhone 6 and above. I attached image here... See In image black part appear on each screen for iPhone 6 and above.....I add all launch images on

“Installation Failed: Invalid Argument” after moving to Xcode 7

回眸只為那壹抹淺笑 提交于 2020-01-14 10:33:24
问题 After agreeing to the "Upgrade to recommended settings" dialog in Xcode 7, my app build but no longer runs on the simulator. The simulator launches properly, but just sits on the home screen. Meanwhile, Xcode displays the error: Installation Failed Invalid Argument 回答1: This happens because "Upgrade to recommended settings" will change the info.plist's CFBundleIdentifier to point to $(PRODUCT_BUNDLE_IDENTIFIER) instead of the old $(BUNDLE_IDENTIFIER) . Apple says in the Xcode 7 release notes

Migrating project to Xcode 7.2 on OS X El Capitan breaks the build

我们两清 提交于 2020-01-13 02:16:12
问题 I was running OS X Mavericks before with Xcode 7.1, I just updated to OS X El Capitan and Xcode 7.2. My app was launching fine on the simulator and device without any kind of warnings for storyboard. Now I see a bunch of warnings for missing constraints in storyboard and the app crashes with this error: Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named IBNSLayoutConstraint' I also tried the solution posted on here :

Xcode 7 iOS9 font no longer recognized

一笑奈何 提交于 2020-01-11 13:11:30
问题 For iOS 7/8 when setting a text's parameters programmatically, it would display as expected when compiled/built to run on device. However, when testing my app for iOS9 in Xcode 7 all my views' frames are off or just plain not visible due to the text.font not recognizing the font. It's not a custom font per se, it's in Apple's library, and in fact, when you set a label via IB it displays properly, but when doing the same thing in code it simply displays the system font. Any ideas how to

Adding a GitHub repository in Xcode 7 using SSH authentication gives an authentication error

ぃ、小莉子 提交于 2020-01-11 09:32:42
问题 I'm trying to set up a Bot in Xcode 7 for integration testing. As part of setting this up I am adding a remote repository to the project using Xcode > Preferences > Accounts > Add Repository... but it fails with the message Authentication failed : GitHub is working at the command line using this SSH key, why is Xcode 7 not working? 回答1: After thinking that this was an Xcode 7 bug, because of posts like this one I finally found that the problem was actually caused by GitHub. GitHub implemented