Autoresizing issue of UICollectionViewCell contentView’s frame in Storyboard prototype cell (Xcode 6, iOS 8 SDK) happens when running on iOS 7 only

contentView is broken. It can be also fixed in awakeFromNib ObjC: – (void)awakeFromNib { [super awakeFromNib]; self.contentView.frame = self.bounds; self.contentView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; } Swift3: override func awakeFromNib() { super.awakeFromNib() self.contentView.frame = self.bounds self.contentView.autoresizingMask = [.flexibleWidth, .flexibleHeight] }

how to save and read array of array in NSUserdefaults in swift?

The question reads “array of array” but I think most people probably come here just wanting to know how to save an array to UserDefaults. For those people I will add a few common examples. String array Save array let array = [“horse”, “cow”, “camel”, “sheep”, “goat”] let defaults = UserDefaults.standard defaults.set(array, forKey: “SavedStringArray”) Retrieve … Read more

Xcode 6 beta 2 issue exporting .ipa: “Your account already has a valid iOS distribution certificate”

I’ve had the same issue two days ago. Turns out the problem was: I have my own developer distribution certificate with a proper private key I have enterprise developer distribution certificate of my client without a private key I try to make an enterprise distribution package for my client Xcode throws at me vague error: … Read more

NSDate Comparison using Swift

If you want to support ==, <, >, <=, or >= for NSDates, you just have to declare this somewhere: public func ==(lhs: NSDate, rhs: NSDate) -> Bool { return lhs === rhs || lhs.compare(rhs) == .OrderedSame } public func <(lhs: NSDate, rhs: NSDate) -> Bool { return lhs.compare(rhs) == .OrderedAscending } extension NSDate: Comparable … Read more

iOS app submission : missing 64-bit support

Use “Standard architectures” like this: Architecture: “Standard architectures” arm7, arm64 Valid Architectures: “arm64” , armv7… Build Active Architecture Only – NO (specially… if your connected device is not arm64 compatible) like this: Additionally, unplugging iphones and ipads from the mac has been known to help, especially if they are 32-bit versions.