I hereby claim:
- I am y8k on github.
- I am y8k (https://keybase.io/y8k) on keybase.
- I have a public key ASBXD3Qi21pe1oIVjQ76feIIDyJSE4wp9DJp1ccEumwORgo
To claim this, I am signing this object:
func previewingContext(previewingContext: UIViewControllerPreviewing, commitViewController viewControllerToCommit: UIViewController) { | |
showViewController(viewControllerToCommit, sender: self) | |
} |
override func previewActionItems() -> [UIPreviewActionItem] { | |
let safariAction = UIPreviewAction(title: "Open with Safari", style: UIPreviewActionStyle.Default) { (action, viewCntrlr) -> Void in | |
UIApplication.sharedApplication().openURL(NSURL(string: "http://y8k.me")!) | |
} | |
let closeAction = UIPreviewAction(title: "Copy URL", style: .Default) { (action, viewCntrlr) -> Void in | |
UIPasteboard.generalPasteboard().string = "http://y8k.me" | |
} | |
{"applinks": {"apps": [], "details": [{ "appID": "[Team ID].com.y8k.UniversalLink", "paths":["*", "/"]}]}} |
func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool { | |
guard let rootViewCntrlr = self.window?.rootViewController else { | |
return false; | |
} | |
guard let viewCntrlr = rootViewCntrlr as? ViewController else { | |
return false; | |
} | |
typedef NS_OPTIONS(NSUInteger, UIViewAnimationOptions) { | |
UIViewAnimationOptionLayoutSubviews = 1 << 0, | |
UIViewAnimationOptionAllowUserInteraction = 1 << 1, // turn on user interaction while animating | |
UIViewAnimationOptionBeginFromCurrentState = 1 << 2, // start all views from current value, not initial value | |
UIViewAnimationOptionRepeat = 1 << 3, // repeat animation indefinitely | |
UIViewAnimationOptionAutoreverse = 1 << 4, // if repeat, run animation back and forth | |
UIViewAnimationOptionOverrideInheritedDuration = 1 << 5, // ignore nested duration | |
UIViewAnimationOptionOverrideInheritedCurve = 1 << 6, // ignore nested curve | |
UIViewAnimationOptionAllowAnimatedContent = 1 << 7, // animate contents (applies to transitions only) | |
UIViewAnimationOptionShowHideTransitionViews = 1 << 8, // flip to/from hidden state instead of adding/removing |
let phoneNumber = "01026979999" | |
// REGEX FOR KOREAN CELL PHONE NUMBER FORMAT | |
let expression = "(\\d{3})(\\d{\(phoneNumber.count - 7)})(\\d{4})" | |
let result = phoneNumber.replacingOccurrences(of: expression, with: "$1-$2-$3", options: .regularExpression, range: nil) |
I hereby claim:
To claim this, I am signing this object: