Skip to content

Commit

Permalink
Added common UIApplicationDelegate methods & new Mark Snippet (#28)
Browse files Browse the repository at this point in the history
* Added Swift UIApplicationDelegate methods snippet.

Even though Xcode fills the AppDelegate with necessary delegate methods during a new project creation, I thought why not include this as a snippet which might help and come in handy sometimes.

* Elegant mark code snippet added

* Added screenshot image for elegant mark

* Updated Readme file for uiapplicationdelegate and elegant mark
  • Loading branch information
BadhanGanesh authored and burczyk committed Apr 13, 2018
1 parent c9ec24a commit 7f4a67d
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Readme.md
Expand Up @@ -60,6 +60,8 @@ swift-iba Create IBAction method stub
swift-uicollectionviewdatasource UICollectionViewDataSource snippet for Swift
swift-singleton Singleton pattern for Swift
swift-uitableviewdatasource UITableViewDataSource snippet for Swift
swift-uiapplicationdelegate Commonly used app life cycle methods
swift-elegantmark Decorates mark statements and makes it neat when looking through items in File Jump Bar
```


Expand Down
Binary file added assets/elegant-mark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions swift-elegantmark.codesnippet
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDECodeSnippetCompletionPrefix</key>
<string>swift-elegantmark</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>All</string>
</array>
<key>IDECodeSnippetContents</key>
<string>
////////////////////////////////////////////////////////////////
//MARK:-
//MARK:&lt;#Section#&gt;
//MARK:-
////////////////////////////////////////////////////////////////
</string>
<key>IDECodeSnippetIdentifier</key>
<string>76C4B4B4-1F7D-41D8-9CE2-0E4E36C668D0</string>
<key>IDECodeSnippetLanguage</key>
<string>Xcode.SourceCodeLanguage.Generic</string>
<key>IDECodeSnippetSummary</key>
<string>Decorates mark statements and makes it neat when looking through items in File Jump Bar</string>
<key>IDECodeSnippetTitle</key>
<string>Elegant Mark</string>
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
</dict>
</plist>
49 changes: 49 additions & 0 deletions swift-uiapplicationdelegate.codesnippet
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDECodeSnippetCompletionPrefix</key>
<string>swift-uiapplicationdelegate</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>ClassImplementation</string>
</array>
<key>IDECodeSnippetContents</key>
<string>func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -&gt; Bool {

return true
}

func applicationWillResignActive(_ application: UIApplication) {

}

func applicationDidBecomeActive(_ application: UIApplication) {

}

func applicationWillEnterForeground(_ application: UIApplication) {

}

func applicationDidEnterBackground(_ application: UIApplication) {

}

func applicationWillTerminate(_ application: UIApplication) {

}</string>
<key>IDECodeSnippetIdentifier</key>
<string>CB10B10E-410C-4668-8B94-4322438AE77B</string>
<key>IDECodeSnippetLanguage</key>
<string>Xcode.SourceCodeLanguage.Swift</string>
<key>IDECodeSnippetSummary</key>
<string>Commonly used app life cycle methods</string>
<key>IDECodeSnippetTitle</key>
<string>Swift - UIApplication Delegate methods</string>
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>0</integer>
</dict>
</plist>

0 comments on commit 7f4a67d

Please sign in to comment.