xcode7

How to put GameCenter on application with swift?

孤街醉人 提交于 2019-12-25 04:28:07
问题 I made a game using SpriteKit and Xcode 7 beta. I tried to add GameCenter and Leaderboard but the problem is that the score in the leaderboard won't change (HighScore doesn't upload to GameCenter), It stay 0 all the time and I don't know how to fix it. I'm using 2 different files: GameViewController.swift, and PointsLabel.swift GameViewController.swift: import GameKit class GameViewController: UIViewController,UIGestureRecognizerDelegate, GKGameCenterControllerDelegate { var score:

How to put GameCenter on application with swift?

。_饼干妹妹 提交于 2019-12-25 04:28:01
问题 I made a game using SpriteKit and Xcode 7 beta. I tried to add GameCenter and Leaderboard but the problem is that the score in the leaderboard won't change (HighScore doesn't upload to GameCenter), It stay 0 all the time and I don't know how to fix it. I'm using 2 different files: GameViewController.swift, and PointsLabel.swift GameViewController.swift: import GameKit class GameViewController: UIViewController,UIGestureRecognizerDelegate, GKGameCenterControllerDelegate { var score:

Add iPhone X layout support to old Xcode 7 / Swift 2 project

和自甴很熟 提交于 2019-12-25 01:34:07
问题 What I have? An old project using Swift 2 and building/running without any issue on Xcode 7. It has a lot of dependencies and sophisticated architecture which makes it complicated to migrate to swift 3/4 (in a short period of time). When app is running on iPhone X it has black bars on top and bottom of the sreen (sizing like on iPhone 6/7/8) What I need? I need to make the app running on iPhone X without black bars on top and bottom of the screen (fullscreen) without updating whole project .

XCode 7.3.1 Archive Error: “Verify that your build process has compiled binaries and copied in bundle resources”

这一生的挚爱 提交于 2019-12-24 17:44:12
问题 I'm having the problem that, whenever I want to archive my iPad App for AdHoc Apps I m getting "Verify that your build process has compiled binaries and copied in bundle resources". So it also complains that the archive process can't find anything to sign with. Can someone help? 回答1: From project navigator select your project and then goes to build phases under the target and check that is there your every classes, storyboards, assets or frameworks are there in compile sources,copy bundle

Xcode 7.0 beta 6: Issue with VectorKit

青春壹個敷衍的年華 提交于 2019-12-24 17:42:44
问题 I'm using MapKit in my App. Everything is fine except with iOS9. I recently downloaded Xcode7.0 beta 6 and ran my project in iOS9 beta , App is hanged with the following error message in console: /BuildRoot/Library/Caches/com.apple.xbs/Sources/VectorKit/VectorKit- 1134.11/GeoCSS/GeoCSS/StyleSheet.cpp:122 STYL Parse: Decode error here /BuildRoot/Library/Caches/com.apple.xbs/Sources/VectorKit/VectorKit-1134.11/GeoCSS/GeoCSS/StyleSheet.cpp:99 STYL Parse: Decode error here Anyone know what is

Use of undeclared type 'DKAsset', Use of unresolved identifier 'DKImagePickerController'?

限于喜欢 提交于 2019-12-24 17:24:27
问题 I want to select multiple images from gallery. so for that I have installed DKImagePikerController Using pod. For that in podfile. pod 'DKImagePickerController' use_frameworks! After that I have followed their demo example for implement gallery in app. but I got follwoing error. 1.Use of undeclared type 'DKAsset'. 2.Use of unresolved identifier 'DKImagePickerController'? I am following this lib and code. https://github.com/zhangao0086/DKImagePickerController 回答1: First of all you need to

Custom UiCollectionViewCell class init not being called

回眸只為那壹抹淺笑 提交于 2019-12-24 16:30:10
问题 Hi I'm using this code to try and make the text resize though I can't seen to get the label to resize. Also the init method in the custom class is not being called. Here is my code: class Cell: UICollectionViewCell { @IBOutlet weak var label: UILabel! override init(frame: CGRect) { super.init(frame: frame) print("init—>Not being called???\n") self.label.adjustsFontSizeToFitWidth = true self.cell.label.sizeToFit() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } } What

2 subclass on 1 UITextField

限于喜欢 提交于 2019-12-24 15:38:12
问题 I got a question that i'm trying to figure out. How can i set 2 different Subclasses in 1 UITextField? I have installed a library ShowPassword (via cocoapod) and currently i'm using it so users can see the password that they are typing. But i have also installed another library that makes an awesome UITextField (also via cocoapods) https://github.com/raulriera/TextFieldEffects And with this library i can insert Subclass Hoshi for example (which i have done in username text field) How can i

How to build project with unsupported class (new feature) in xcode and swift

帅比萌擦擦* 提交于 2019-12-24 14:47:19
问题 I'm new in Apple platform and I started with xcode 7 and swift. I want to create app for last version of iOS (9.0) but with support of 2 older versions like 8 and 7. Base SDK : Latest (iOS 9.0) Deployment : 7 I used UIAlertController and it's not available in iOS 7, So I can't build my project and I get error: 'UIAlertController' is only availble on iOS 8.0 or newer My problem isn't just this class, I looking for a solution to figure out how to handle multi version-device app. Also I read

No Retina 4 option in xcode 7 then how do I set fullscreen images in asset to make them show correctly in 4s/5s & iPhone 6?

放肆的年华 提交于 2019-12-24 12:26:07
问题 In xcode 7 these is no retina 4 option, according to this, apple removed it on purpose. I did edit Contents.json to get it back but the effect is not the same! I remember in XCode6/pre-iOS9 iPhone 6 will used retina 4 picture so I only need to set one fullscreen 2x picture for iPhone 4/4s, one fullscreen Retina 4 for iPhone 5/5s and 6. I think using Retina4 for iPhone 6 really makes sense while 2x doesn't! Because 1334/750 is about 1.778, which is close to 1136/640 = 1.775 while 960/640 = 1.5