tasanobu-zz / kamagari Goto Github PK
View Code? Open in Web Editor NEWSimple UIAlertController builder class in Swift.
License: MIT License
Simple UIAlertController builder class in Swift.
License: MIT License
2015-07-17 12:28:09.187 Sample[75631:2123973] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController (<UIAlertController: 0x7fbcbd09b2e0>) of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem. If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000107e98c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000109a03bb7 objc_exception_throw + 45
2 UIKit 0x0000000108e4b03a -[UIPopoverPresentationController presentationTransitionWillBegin] + 2650
3 UIKit 0x0000000108846d39 __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 1305
4 UIKit 0x0000000108845380 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 189
5 UIKit 0x000000010875b5ec _applyBlockToCFArrayCopiedToStack + 314
6 UIKit 0x000000010875b466 _afterCACommitHandler + 533
7 CoreFoundation 0x0000000107dcbca7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
8 CoreFoundation 0x0000000107dcbc00 __CFRunLoopDoObservers + 368
9 CoreFoundation 0x0000000107dc1a33 __CFRunLoopRun + 1123
10 CoreFoundation 0x0000000107dc1366 CFRunLoopRunSpecific + 470
11 GraphicsServices 0x000000010be9ea3e GSEventRunModal + 161
12 UIKit 0x00000001087378c0 UIApplicationMain + 1282
13 Sample 0x0000000107c88ef7 main + 135
14 libdyld.dylib 0x000000010a16b145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
let alert = AlertBuilder(title: "", message: R.string.please_enable_location, preferredStyle: .alert)
.addAction(title: "Cancel", style: .cancel) { _ in }
.addAction(title: "Settings", style: .default) { _ in
UIApplication.shared.openURL(URL(string: "App-Prefs:root=Privacy&path=LOCATION")!)
alert.dismiss(animated: true, completion: nil) // compiler error
}
.build()
alert.kam_show(animated: true)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.