Requires iOS 8+
Say you want 3 cells per row in portrait, but 4 cells in landscape. First calculate the cell dimensions based on the screen width and a padding of 5.
var cellsPerRow:CGFloat = 3
let cellPadding:CGFloat = 5
TODO: WIP. Need to test next time I integrate this.
See Greg Heo's video ScrollView tutorial on raywenderlich.com.
Text boxes can get covered up by the keyboard, especially on 3.5 inch screens (4s). The first step is to embed the page contents inside a UIScrollView
.
@IBOutlet weak var scrollview: UIScrollView!
The Storyboard
has views Visual Effect View with Blur
and Visual Effect View with Blur and Vibrancy
. You can almost treat this like empty views.
So if you wanted a login dialog box that came up as a modal, but blur the background:
Over Current Context
so the screen below doesn't vanishVisual Effect View with Blur
behind your other views, serving as a backgroundThis is the Jay Chou Playlist I want videos from:
https://www.youtube.com/playlist?list=PL50C17441DA8A565D
YouTube's API explorer has a playlist endpoint:
https://developers.google.com/youtube/v3/docs/playlistItems/list
See Network Starter Kit.
This is the script for Tuesday's Columbia iOS meetup.
Object | Contains |
---|
This assumes you have SwiftyJSON.
Start with a Dictionary
let paramsDictionary = [
"title": "foo",
"description": "bar"
See http://krakendev.io/blog/the-right-way-to-write-a-singleton
This creates a new User
if necessary, or uses the existing one.
class User {
static let sharedInstance = User()
var name = "Bruce"
You want to iterate over an array of custom objects, and need to tell whether two objects are equal. You're not concerned with two objects being identical in memory, but equivalent based on your own definition.
class Student {
var studentId = 0
var firstName = "Bob"
}