Created
August 22, 2016 08:00
-
-
Save fitomad/448aa21c44d12677ca4174c6ce5a3bf6 to your computer and use it in GitHub Desktop.
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
// | |
// In *Swift 3* we have to change `private` in favor of `fileprivate` | |
// Now `private` means **accesible under the scope**, usually {...} and | |
// `fileprivate` is accesible inside the file. | |
// | |
// | |
// MARK: - A Class | |
// | |
internal class FilterView: UIView | |
{ | |
/// Elements returned after apply filter | |
@IBOutlet fileprivate weak var labelQuantity: UILabel! | |
... | |
} | |
// | |
// MARK: - Implements Protocol | |
// | |
extension FilterView: SomeProtocol | |
{ | |
func apply(filter: String) -> Void | |
{ | |
var quantity: Int = ... | |
// Now compiles OK | |
self.labelQuantity.text = "Founded \(quantity) element(s)." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment