aimedivy-blog
aimedivy-blog
Untitled
3 posts
Don't wanna be here? Send us removal request.
aimedivy-blog · 6 years ago
Text
How to turn on Dark Mode in ios13 simulator (beta)
Settings -> Developer -> Dark Appearance = ON/OFF
Tumblr media
0 notes
aimedivy-blog · 9 years ago
Text
How to get components from a date in Swift
I had the hardest time figuring out how to create NSDateComponents from a date in Swift. How do you tell NSCalendar which units you want? You can’t do what you’d do in Objective-C…
I eventually stumbled across a solution. Here’s how to get components from a date in Swift, specifying the NSCalendarUnit flags:
let date = NSDate() let unitFlags: NSCalendarUnit = [.Hour, .Day, .Month, .Year] let components = NSCalendar.currentCalendar().components(unitFlags, fromDate: date)
0 notes
aimedivy-blog · 10 years ago
Text
Image Naming Convention for iOS
Standard: <ImageName><device_modifier>.<filename_extension> High resolution: <ImageName>@2x<device_modifier>.
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/LoadingResources/ImageSoundResources/ImageSoundResources.html#//apple_ref/doc/uid/10000051i-CH7-SW17
0 notes