- How does your app access its data?
- How do you make sure your components have access to the data they need?
- What manages the data?
- How does your screen show that it's loading something? (e.g. from the internet)
- How does your screen show that the loading failed?
- How does your screen show a modal explanation of something? (e.g. tutorial, alert dialog)
- How does a user fill in information?
- How do you validate that information?
- How is the user shown that certain input is wrong/didn't pass validation?
- How does the onboarding show?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
protocol Money { | |
var value: Double { get } | |
var inGold: Double { get } | |
var symbol: String { get } | |
} | |
// Sadly, gives a compiler error. | |
// "Extension of protocol 'Money' cannot have an inheritance clause" | |
extension Money: CustomStringConvertible { | |
var description: String { |
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
* Some setting to allow always randomizing your starting leader and buddy. | |
* Being able to share custom characters somehow. Would be great download some that other people made. | |
* Some extra exploration; would love some random, non-useful gags to discover in certain locations. |
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
import UIKit | |
import PlaygroundSupport | |
//: NSLayoutConstraint convenience methods | |
public extension NSLayoutConstraint { | |
public static func pinning(attribute: NSLayoutAttribute, ofView firstView: UIView, toView secondView: UIView, multiplier: CGFloat = 1, offset: CGFloat = 0) -> NSLayoutConstraint { | |
return NSLayoutConstraint(item: firstView, attribute: attribute, relatedBy: .equal, toItem: secondView, attribute: attribute, multiplier: multiplier, constant: offset) | |
} | |
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
import UIKit | |
import PlaygroundSupport | |
public extension UIColor { | |
public func hsba() -> (hue: CGFloat, saturation: CGFloat, brightness: CGFloat, alpha: CGFloat)? { | |
var hue: CGFloat = .nan, saturation: CGFloat = .nan, brightness: CGFloat = .nan, alpha: CGFloat = .nan | |
guard self.getHue(&hue, saturation: &saturation, brightness: &brightness, alpha: &alpha) else { | |
return nil | |
} | |
return (hue: hue, saturation: saturation, brightness: brightness, alpha: alpha) |
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
on run {input, parameters} | |
repeat with _document in input | |
tell application "Finder" | |
set _directory to get container of file _document | |
set _documentName to name of _document | |
if _documentName ends with ".pages" then ¬ | |
set _documentName to text 1 thru -7 of _documentName | |
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
desc "Downloads the latest apple_strings and updates the project with them." | |
lane :"update_strings" do | |
puts "Updating English." | |
update_language(lang: 'en', base: true) | |
puts "Updating French." | |
update_language(lang: 'fr') | |
puts "Updating German." | |
update_language(lang: 'de') | |
end | |
- Follow the instructions on this iMore tutorial
- EXCEPT when you have to enter the terminal command, use the following command instead;
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/elcap --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
NewerOlder