Tumgik
swiftdev · 10 years
Text
Subclassing UIImageView
When subclassing objects for use in Interface Builder, make sure to use "initWithCoder" for setup stuff. In general, it seems that subclassing UIImageView/UIImage is possibly bad form, and that categories would be preferred - will need to look into that next.
0 notes
swiftdev · 10 years
Link
UIImageViewAligned - A UIImageView subclass which allows you to align the image left/right/top/bottom, even when contentMode is AspectFit.
Really useful for my implementation of scrolling parallax views that are positioned at the top of the screen. Can manage properties via IB and not resort to code, which is nice.
0 notes
swiftdev · 10 years
Photo
Tumblr media
https://itunes.apple.com/us/book/using-swift-cocoa-objective/id888894773
0 notes
swiftdev · 10 years
Text
Autolayout Blues
Make sure to keep "Clip subviews" OFF for the main view, and make sure it's turned ON for subviews, like my UIScrollViews containing parallax image containers. Argh. Painful.
0 notes
swiftdev · 10 years
Link
Learn the basics of Swift development in iOS in this fun and easy Swift tutorial for complete beginners!
1 note · View note
swiftdev · 10 years
Text
Horizontal UIScrollView with pagination & page control
It's possible to do it all in Interface Builder with minimal stuff in code. This is for a static scroller, though - i.e., you know the number of pages in advance.
0 notes
swiftdev · 10 years
Text
UIRefreshControl funkiness
When using a UIRefreshControl on a UIScrollView that is being built with Interface Builder, must remember to set Simulated Metrics Size back to "Inferred" in order to get the UIRefreshControl to start working! 
0 notes
swiftdev · 10 years
Link
Download a handy 1-page PDF Swift Cheat Sheet and Quick Reference!
0 notes
swiftdev · 10 years
Photo
Tumblr media
Getting some various, funky errors and really high CPU usage with the Xcode 6 beta... but to be expected with Beta 1. The documentation describes Swift as feeling familiar to Objective-C developers - but as a recent Obj-C student, it feels quite different but in an interesting and exciting way!
0 notes
swiftdev · 10 years
Quote
“Swift is a new programming language for iOS and OS X apps that builds on the best of C and Objective-C, without the constraints of C compatibility. Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible, and more fun. Swift’s clean slate, backed by the mature and much-loved Cocoa and Cocoa Touch frameworks, is an opportunity to reimagine how software development works.”
Excerpt From: Apple Inc. “The Swift Programming Language.” iBooks. https://itun.es/us/jEUH0.l
0 notes