This file contains hidden or 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 class Main { | |
| public static void main(String[] args) { | |
| Veiculo f1 = new CarroF1(); | |
| f1.acelera(10); | |
| f1.acelera(10); | |
| f1.freia(50); | |
This file contains hidden or 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
| func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
| if ProcessInfo().environment["XCInjectBundleInto"] != nil { return true } | |
| ... | |
| } |
This file contains hidden or 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 CloudTagViewDelegate { | |
| func cloud(_ cloud: CloudTagView, tagTouched tag: TagView) | |
| func cloud(_ cloud: CloudTagView, tagDismissed tag: TagView) | |
| } |
This file contains hidden or 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
| http://www.google.com/maps/d/u/0/kml?forcekml=1&mid=14eieZr331zbNk2zfPIWdT4fHY_c |
This file contains hidden or 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
| let frameworkBundle = Bundle(for: IniciaisImageView.self) | |
| guard let bundleURL = frameworkBundle.resourceURL?.appendingPathComponent("AgiplanUtils.bundle") else { return } | |
| let resourceBundle = Bundle(url: bundleURL) | |
| guard let view = resourceBundle?.loadNibNamed("IniciaisImageView", owner: self, options: nil)?.first as? UIView else { | |
| return | |
| } |
This file contains hidden or 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
| open -a Atom ~/.gitconfig |
This file contains hidden or 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
| extension UITextField { | |
| // Works only if the UITextField don't have the focus and have some text, | |
| // so prefer call this in the didEndEditing event. | |
| func setNumberOfLines(_ numberOfLines: Int, lineBreakMode: NSLineBreakMode) { | |
| self.subviews.forEach { subview in | |
| guard let label = subview as? UILabel else { return } | |
| label.lineBreakMode = lineBreakMode | |
| label.numberOfLines = numberOfLines | |
| } |
This file contains hidden or 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
| func recursiveDescription(view: UIView, count: Int) { | |
| let subviews = view.subviews | |
| if subviews.count == 0 { | |
| return | |
| } | |
| var tabs = "" | |
| for i in 0..<count { | |
| tabs = tabs+"...." |
This file contains hidden or 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
| 1. Add #import "MyFirstProjectOnSwift-Swift.h" in "MyObjectiveCLass.m" | |
| 2. Add @class mySwiftClass in MyObjectiveCLass.h; | |
| 3. Then in MyObjectiveCLass.m | |
| mySwiftClass *myClass = [mySwiftClass new]; {Call Like This in any method wherever you want to call swift method.} | |
| 4. [myClass methodName]; | |
| Source: http://stackoverflow.com/questions/24078043/call-swift-function-from-objective-c-class |
This file contains hidden or 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
| Xcode > Project > Target > Build Phases > Compile Sources > Compiler Flags: -w | |
| Source: http://stackoverflow.com/questions/6921884/in-xcode-how-to-suppress-all-warnings-in-specific-source-files |
NewerOlder