Last active
June 13, 2016 10:12
-
-
Save SteveRohrlack/b614a7f8d90b92acf4ec2a918d91b59d to your computer and use it in GitHub Desktop.
swift property visibility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct Book { | |
public private(set) var page: Int | |
public mutating func browseTo(page requestedPage: Int) { | |
page = requestedPage | |
/// show requested page | |
/// do other things that have to be done when | |
/// changing the current page | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment