├── AsyncUITableview ├── AsyncUITableview.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── MM.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── MM.xcuserdatad │ │ └── xcschemes │ │ ├── AsyncUITableview.xcscheme │ │ └── xcschememanagement.plist ├── AsyncUITableview │ ├── 1.png │ ├── 10.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── 6.png │ ├── 7.png │ ├── 8.png │ ├── 9.png │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── 120 x 120.png │ │ │ ├── 58 x 58.png │ │ │ ├── 80 x 80.png │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── Default-568h@2x.png │ │ │ └── Default@2x.png │ ├── Info.plist │ ├── MyTableViewCell.swift │ ├── MyTableViewController.swift │ └── UTILITY.swift ├── AsyncUITableviewTests │ ├── AsyncUITableviewTests.swift │ └── Info.plist └── README.md ├── LICENSE ├── README.md ├── Swift-RSSFeed ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods │ ├── AFNetworking │ │ ├── AFNetworking │ │ │ ├── AFHTTPRequestOperation.h │ │ │ ├── AFHTTPRequestOperation.m │ │ │ ├── AFHTTPRequestOperationManager.h │ │ │ ├── AFHTTPRequestOperationManager.m │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFHTTPSessionManager.m │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── AFNetworkReachabilityManager.m │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFSecurityPolicy.m │ │ │ ├── AFURLConnectionOperation.h │ │ │ ├── AFURLConnectionOperation.m │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── AFURLRequestSerialization.m │ │ │ ├── AFURLResponseSerialization.h │ │ │ ├── AFURLResponseSerialization.m │ │ │ ├── AFURLSessionManager.h │ │ │ └── AFURLSessionManager.m │ │ ├── LICENSE │ │ ├── README.md │ │ └── UIKit+AFNetworking │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ ├── AFNetworkActivityIndicatorManager.m │ │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ │ ├── UIActivityIndicatorView+AFNetworking.m │ │ │ ├── UIAlertView+AFNetworking.h │ │ │ ├── UIAlertView+AFNetworking.m │ │ │ ├── UIButton+AFNetworking.h │ │ │ ├── UIButton+AFNetworking.m │ │ │ ├── UIImageView+AFNetworking.h │ │ │ ├── UIImageView+AFNetworking.m │ │ │ ├── UIKit+AFNetworking.h │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ ├── UIProgressView+AFNetworking.m │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ ├── UIRefreshControl+AFNetworking.m │ │ │ ├── UIWebView+AFNetworking.h │ │ │ └── UIWebView+AFNetworking.m │ ├── BuildHeaders │ │ ├── AFNetworking │ │ │ ├── AFHTTPRequestOperation.h │ │ │ ├── AFHTTPRequestOperationManager.h │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFURLConnectionOperation.h │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── AFURLResponseSerialization.h │ │ │ ├── AFURLSessionManager.h │ │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ │ ├── UIAlertView+AFNetworking.h │ │ │ ├── UIButton+AFNetworking.h │ │ │ ├── UIImageView+AFNetworking.h │ │ │ ├── UIKit+AFNetworking.h │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ └── UIWebView+AFNetworking.h │ │ └── MWFeedParser │ │ │ ├── GTMNSString+HTML.h │ │ │ ├── MWFeedInfo.h │ │ │ ├── MWFeedItem.h │ │ │ ├── MWFeedParser.h │ │ │ ├── MWFeedParser_Private.h │ │ │ ├── NSDate+InternetDateTime.h │ │ │ └── NSString+HTML.h │ ├── Headers │ │ ├── AFNetworking │ │ │ ├── AFHTTPRequestOperation.h │ │ │ ├── AFHTTPRequestOperationManager.h │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFURLConnectionOperation.h │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── AFURLResponseSerialization.h │ │ │ ├── AFURLSessionManager.h │ │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ │ ├── UIAlertView+AFNetworking.h │ │ │ ├── UIButton+AFNetworking.h │ │ │ ├── UIImageView+AFNetworking.h │ │ │ ├── UIKit+AFNetworking.h │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ └── UIWebView+AFNetworking.h │ │ └── MWFeedParser │ │ │ ├── GTMNSString+HTML.h │ │ │ ├── MWFeedInfo.h │ │ │ ├── MWFeedItem.h │ │ │ ├── MWFeedParser.h │ │ │ ├── MWFeedParser_Private.h │ │ │ ├── NSDate+InternetDateTime.h │ │ │ └── NSString+HTML.h │ ├── MWFeedParser │ │ ├── Classes │ │ │ ├── GTMNSString+HTML.h │ │ │ ├── GTMNSString+HTML.m │ │ │ ├── MWFeedInfo.h │ │ │ ├── MWFeedInfo.m │ │ │ ├── MWFeedItem.h │ │ │ ├── MWFeedItem.m │ │ │ ├── MWFeedParser.h │ │ │ ├── MWFeedParser.m │ │ │ ├── MWFeedParser_Private.h │ │ │ ├── NSDate+InternetDateTime.h │ │ │ ├── NSDate+InternetDateTime.m │ │ │ ├── NSString+HTML.h │ │ │ └── NSString+HTML.m │ │ ├── LICENSE.txt │ │ └── README.markdown │ ├── Manifest.lock │ ├── Pods-AFNetworking-Private.xcconfig │ ├── Pods-AFNetworking-dummy.m │ ├── Pods-AFNetworking-prefix.pch │ ├── Pods-AFNetworking.xcconfig │ ├── Pods-MWFeedParser-Private.xcconfig │ ├── Pods-MWFeedParser-dummy.m │ ├── Pods-MWFeedParser-prefix.pch │ ├── Pods-MWFeedParser.xcconfig │ ├── Pods-acknowledgements.markdown │ ├── Pods-acknowledgements.plist │ ├── Pods-dummy.m │ ├── Pods-environment.h │ ├── Pods-resources.sh │ ├── Pods.xcconfig │ └── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── xcuserdata │ │ └── MM.xcuserdatad │ │ └── xcschemes │ │ ├── Pods-AFNetworking.xcscheme │ │ ├── Pods-MWFeedParser.xcscheme │ │ ├── Pods.xcscheme │ │ └── xcschememanagement.plist ├── README.md ├── RSSFeeder-Bridging-Header.m ├── RSSFeeder.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── MM.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── MM.xcuserdatad │ │ └── xcschemes │ │ ├── RSSFeeder.xcscheme │ │ └── xcschememanagement.plist ├── RSSFeeder.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── MM.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── RSSFeeder │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── 120 x 120.png │ │ │ ├── 58 x 58.png │ │ │ ├── 80 x 80.png │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── Default-568h@2x.png │ │ │ └── Default@2x .png │ ├── Info.plist │ ├── MyTableViewCell.swift │ ├── MyTableViewController.swift │ ├── WebviewController.swift │ └── a.png └── RSSFeederTests │ ├── Info.plist │ └── RSSFeederTests.swift ├── SwiftUITableView ├── README.md ├── SwiftUITableView.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── MM.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── MM.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── SwiftUITableView.xcscheme │ │ └── xcschememanagement.plist ├── SwiftUITableView │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── CustomCell.swift │ ├── DetailTableViewCell.swift │ ├── DetailViewController.swift │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ ├── MyTableViewController.swift │ ├── data.json │ ├── female.png │ ├── j.png │ ├── male.png │ └── profile_banner.png └── SwiftUITableViewTests │ ├── Info.plist │ └── SwiftUITableViewTests.swift ├── TableView Samples └── Simple TableView │ ├── README.md │ ├── TableViewSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── TableViewSample.xccheckout │ │ └── xcuserdata │ │ │ └── MM.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── MM.xcuserdatad │ │ └── xcschemes │ │ ├── TableViewSample.xcscheme │ │ └── xcschememanagement.plist │ ├── TableViewSample │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── 120 x 120.png │ │ │ ├── 58 x 58.png │ │ │ ├── 80 x 80.png │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Info.plist │ └── myTableViewController.swift │ └── TableViewSampleTests │ ├── Info.plist │ └── TableViewSampleTests.swift └── UICollectionView+Swift ├── LICENSE ├── README.md ├── UICollectionView+Swift.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── UICollectionView+Swift.xccheckout │ └── xcuserdata │ │ └── MM.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── MM.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── UICollectionView+Swift.xcscheme │ └── xcschememanagement.plist ├── UICollectionView+Swift ├── AlbumCell.swift ├── AlbumViewController.swift ├── AppDelegate.swift ├── Avatar │ ├── a.png │ ├── b.png │ ├── c.png │ ├── close@2x.png │ ├── d.png │ ├── e.png │ ├── f.png │ ├── g.png │ ├── h.png │ ├── j.png │ ├── k.png │ ├── l.png │ ├── m.png │ ├── n.png │ ├── o.png │ ├── p.png │ ├── photo-frame.png │ ├── q.png │ ├── r.png │ └── s.png ├── Base.lproj │ └── Main.storyboard ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── 120 x 120.png │ │ ├── 58 x 58.png │ │ ├── 80 x 80.png │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ ├── Contents.json │ │ ├── Default-568h@2x.png │ │ └── Default@2x .png ├── Info.plist ├── ProfileController.swift ├── UTILITY.swift ├── banner1.jpg ├── banner2.jpg ├── banner3.jpg ├── banner4.jpg └── i.png └── UICollectionView+SwiftTests ├── Info.plist └── UICollectionView_SwiftTests.swift /AsyncUITableview/AsyncUITableview.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview.xcodeproj/project.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview.xcodeproj/project.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/AsyncUITableview.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AsyncUITableview.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8DA65D73198E3F71005EE11F 16 | 17 | primary 18 | 19 | 20 | 8DA65D85198E3F71005EE11F 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/1.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/10.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/2.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/3.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/4.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/5.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/6.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/7.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/8.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/9.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AsyncUITableview 4 | // 5 | // Created by Jigar M on 03/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/Images.xcassets/AppIcon.appiconset/120 x 120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/Images.xcassets/AppIcon.appiconset/120 x 120.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/Images.xcassets/AppIcon.appiconset/58 x 58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/Images.xcassets/AppIcon.appiconset/58 x 58.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/Images.xcassets/AppIcon.appiconset/80 x 80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/Images.xcassets/AppIcon.appiconset/80 x 80.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "58 x 58.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "40x40", 11 | "idiom" : "iphone", 12 | "filename" : "80 x 80.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "60x60", 17 | "idiom" : "iphone", 18 | "filename" : "120 x 120.png", 19 | "scale" : "2x" 20 | } 21 | ], 22 | "info" : { 23 | "version" : 1, 24 | "author" : "xcode" 25 | } 26 | } -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "filename" : "Default@2x.png", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "extent" : "full-screen", 13 | "idiom" : "iphone", 14 | "subtype" : "retina4", 15 | "filename" : "Default-568h@2x.png", 16 | "minimum-system-version" : "7.0", 17 | "orientation" : "portrait", 18 | "scale" : "2x" 19 | } 20 | ], 21 | "info" : { 22 | "version" : 1, 23 | "author" : "xcode" 24 | } 25 | } -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/Images.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/AsyncUITableview/AsyncUITableview/Images.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.jigarm.InfiniteScroll 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | Infinite Scroll 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/MyTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewCell.swift 3 | // AsyncUITableview 4 | // 5 | // Created by Jigar M on 04/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MyTableViewCell: UITableViewCell { 12 | 13 | @IBOutlet var img : UIImageView 14 | @IBOutlet var lbl : UILabel 15 | } 16 | -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableview/UTILITY.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UTILITY.swift 3 | // AsyncUITableview 4 | // 5 | // Created by Jigar M on 04/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class UTILITY: NSObject { 12 | 13 | class func getRandomNumberBetween (From: Int , To: Int) -> Int { 14 | return From + Int(arc4random_uniform(UInt32(To - From + 1))) 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableviewTests/AsyncUITableviewTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AsyncUITableviewTests.swift 3 | // AsyncUITableviewTests 4 | // 5 | // Created by Jigar M on 03/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class AsyncUITableviewTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /AsyncUITableview/AsyncUITableviewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.jigarm.InfiniteScroll 11 | LSApplicationCategoryType 12 | 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Infinite Scroll 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | 26 | 27 | -------------------------------------------------------------------------------- /AsyncUITableview/README.md: -------------------------------------------------------------------------------- 1 | Infinite-UIITableview-Scroll 2 | ============================ 3 | 4 | Infinite UITableview Scroll in Swift Language 5 | 6 | Simple Tests of Swift Language (no Objective-C) 7 | ================================================== 8 | 9 | + How to use NSObject file in Other Controller 10 | + Class 11 | + GDC (Grand Dispatch Center) 12 | + Methods & Properties 13 | + Closure 14 | + UIControlEvents 15 | + Button Target 16 | + Loading Indicator 17 | + Dictionary and Arrays 18 | + UITableView 19 | + customCell (UITableViewCell) 20 | + JSON string 21 | 22 | ### App Previews 23 | ==================== 24 | 25 | Appicon : 26 | 27 | ![](http://i1282.photobucket.com/albums/a534/jigarm_0809/iOSSimulatorScreenShot05-Aug-201474538am_zpsf1a2e774.png) 28 | 29 | UITableView : 30 | 31 | ![](http://i1282.photobucket.com/albums/a534/jigarm_0809/iOSSimulatorScreenShot05-Aug-201474543am_zps83b5f2c5.png) 32 | 33 | Infinite Scroll Indicator : 34 | 35 | ![](http://i1282.photobucket.com/albums/a534/jigarm_0809/iOSSimulatorScreenShot05-Aug-201474547am_zpsae9b5267.png) 36 | 37 | 38 | 39 | ============================ 40 |

Require

41 | OSX 10.9.3 and Xcode 6.x (beta for now) 42 | 43 | Swift 44 | --- 45 | 46 | This project will highlight a few of the core language features about Swift, but I would read through these documents, I found them useful to learn more about Swift and understanding teh structure and syntax of the language: 47 | 48 | * [__Apple Documentation__](https://developer.apple.com/library/prerelease/ios/documentation/swift/conceptual/swift_programming_language/index.html) 49 | * [__Download the iBook__](https://itunes.apple.com/us/book/the-swift-programming-language/id881256329?mt=11) 50 | * [__Swift Cheat Sheet__](https://github.com/grant/swift-cheat-sheet) 51 | * [__Swift Language Highlights by Matt Galloway__](http://www.raywenderlich.com/73997/swift-language-highlights) 52 | 53 | 54 | ## License 55 | 56 | The MIT License (MIT) 57 | 58 | Copyright (c) 2014 Jigar M 59 | 60 | Permission is hereby granted, free of charge, to any person obtaining a copy 61 | of this software and associated documentation files (the "Software"), to deal 62 | in the Software without restriction, including without limitation the rights 63 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 64 | copies of the Software, and to permit persons to whom the Software is 65 | furnished to do so, subject to the following conditions: 66 | 67 | The above copyright notice and this permission notice shall be included in all 68 | copies or substantial portions of the Software. 69 | 70 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 71 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 72 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 73 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 74 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 75 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 76 | SOFTWARE. 77 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Swift-Tutorials 2 | =============== 3 | 4 | Swift tutorial for New Developer like me 5 | 6 | ##Checked it out the Samples Code : 7 | 8 | + Infinite-UIITableview-Scroll : https://github.com/JigarM/Infinite-UIITableview-Scroll 9 | + Swift UITableView : https://github.com/JigarM/Swift---UITableView 10 | + Swift-RSSFeed (Cocoapods+Swift) : https://github.com/JigarM/Swift-RSSFeed 11 | + UICollectionView+Swift : https://github.com/JigarM/UICollectionView-Swift 12 | 13 | 14 | To Do : 15 | ============= 16 | Working on other Smaples 17 | -------------------------------------------------------------------------------- /Swift-RSSFeed/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Jigar M 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '7' 2 | 3 | pod 'MWFeedParser' 4 | pod 'AFNetworking' -------------------------------------------------------------------------------- /Swift-RSSFeed/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (2.3.1): 3 | - AFNetworking/NSURLConnection 4 | - AFNetworking/NSURLSession 5 | - AFNetworking/Reachability 6 | - AFNetworking/Security 7 | - AFNetworking/Serialization 8 | - AFNetworking/UIKit 9 | - AFNetworking/NSURLConnection (2.3.1): 10 | - AFNetworking/Reachability 11 | - AFNetworking/Security 12 | - AFNetworking/Serialization 13 | - AFNetworking/NSURLSession (2.3.1): 14 | - AFNetworking/Reachability 15 | - AFNetworking/Security 16 | - AFNetworking/Serialization 17 | - AFNetworking/Reachability (2.3.1) 18 | - AFNetworking/Security (2.3.1) 19 | - AFNetworking/Serialization (2.3.1) 20 | - AFNetworking/UIKit (2.3.1): 21 | - AFNetworking/NSURLConnection 22 | - AFNetworking/NSURLSession 23 | - MWFeedParser (1.0.1): 24 | - MWFeedParser/FeedParser 25 | - MWFeedParser/NSDate+InternetDateTime 26 | - MWFeedParser/NSString+HTML 27 | - MWFeedParser/FeedParser (1.0.1): 28 | - MWFeedParser/NSDate+InternetDateTime 29 | - MWFeedParser/NSString+HTML 30 | - MWFeedParser/NSDate+InternetDateTime (1.0.1) 31 | - MWFeedParser/NSString+HTML (1.0.1) 32 | 33 | DEPENDENCIES: 34 | - AFNetworking 35 | - MWFeedParser 36 | 37 | SPEC CHECKSUMS: 38 | AFNetworking: 6d7b76aa5d04c8c37daad3eef4b7e3f2a7620da3 39 | MWFeedParser: 003cbf5398e99a7f2057fbe9583054fd1b84be72 40 | 41 | COCOAPODS: 0.33.1 42 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/AFNetworking/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | // AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import 25 | 26 | #ifndef _AFNETWORKING_ 27 | #define _AFNETWORKING_ 28 | 29 | #import "AFURLRequestSerialization.h" 30 | #import "AFURLResponseSerialization.h" 31 | #import "AFSecurityPolicy.h" 32 | #import "AFNetworkReachabilityManager.h" 33 | 34 | #import "AFURLConnectionOperation.h" 35 | #import "AFHTTPRequestOperation.h" 36 | #import "AFHTTPRequestOperationManager.h" 37 | 38 | #if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \ 39 | ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) ) 40 | #import "AFURLSessionManager.h" 41 | #import "AFHTTPSessionManager.h" 42 | #endif 43 | 44 | #endif /* _AFNETWORKING_ */ 45 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/AFNetworking/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | // AFNetworkActivityIndicatorManager.h 2 | // 3 | // Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #import 26 | 27 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 28 | 29 | #import 30 | 31 | /** 32 | `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a network request operation has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero. 33 | 34 | You should enable the shared instance of `AFNetworkActivityIndicatorManager` when your application finishes launching. In `AppDelegate application:didFinishLaunchingWithOptions:` you can do so with the following code: 35 | 36 | [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES]; 37 | 38 | By setting `isNetworkActivityIndicatorVisible` to `YES` for `sharedManager`, the network activity indicator will show and hide automatically as requests start and finish. You should not ever need to call `incrementActivityCount` or `decrementActivityCount` yourself. 39 | 40 | See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information: 41 | http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44 42 | */ 43 | @interface AFNetworkActivityIndicatorManager : NSObject 44 | 45 | /** 46 | A Boolean value indicating whether the manager is enabled. 47 | 48 | If YES, the manager will change status bar network activity indicator according to network operation notifications it receives. The default value is NO. 49 | */ 50 | @property (nonatomic, assign, getter = isEnabled) BOOL enabled; 51 | 52 | /** 53 | A Boolean value indicating whether the network activity indicator is currently displayed in the status bar. 54 | */ 55 | @property (readonly, nonatomic, assign) BOOL isNetworkActivityIndicatorVisible; 56 | 57 | /** 58 | Returns the shared network activity indicator manager object for the system. 59 | 60 | @return The systemwide network activity indicator manager. 61 | */ 62 | + (instancetype)sharedManager; 63 | 64 | /** 65 | Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator. 66 | */ 67 | - (void)incrementActivityCount; 68 | 69 | /** 70 | Decrements the number of active network requests. If this number becomes zero after decrementing, this will stop animating the status bar network activity indicator. 71 | */ 72 | - (void)decrementActivityCount; 73 | 74 | @end 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.h 2 | // 3 | // Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #import 26 | 27 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 28 | 29 | #import 30 | 31 | @class AFURLConnectionOperation; 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a request operation or session task. 35 | */ 36 | @interface UIActivityIndicatorView (AFNetworking) 37 | 38 | ///---------------------------------- 39 | /// @name Animating for Session Tasks 40 | ///---------------------------------- 41 | 42 | /** 43 | Binds the animating state to the state of the specified task. 44 | 45 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 46 | */ 47 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 48 | - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task; 49 | #endif 50 | 51 | ///--------------------------------------- 52 | /// @name Animating for Request Operations 53 | ///--------------------------------------- 54 | 55 | /** 56 | Binds the animating state to the execution state of the specified operation. 57 | 58 | @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. 59 | */ 60 | - (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation; 61 | 62 | @end 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.m 2 | // 3 | // Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "UIActivityIndicatorView+AFNetworking.h" 24 | 25 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 26 | 27 | #import "AFHTTPRequestOperation.h" 28 | 29 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 30 | #import "AFURLSessionManager.h" 31 | #endif 32 | 33 | @implementation UIActivityIndicatorView (AFNetworking) 34 | 35 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 36 | - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { 37 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 38 | 39 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 40 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 41 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 42 | 43 | if (task) { 44 | if (task.state != NSURLSessionTaskStateCompleted) { 45 | if (task.state == NSURLSessionTaskStateRunning) { 46 | [self startAnimating]; 47 | } else { 48 | [self stopAnimating]; 49 | } 50 | 51 | [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingTaskDidResumeNotification object:task]; 52 | [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task]; 53 | [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidSuspendNotification object:task]; 54 | } 55 | } 56 | } 57 | #endif 58 | 59 | #pragma mark - 60 | 61 | - (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation { 62 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 63 | 64 | [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; 65 | [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; 66 | 67 | if (operation) { 68 | if (![operation isFinished]) { 69 | if ([operation isExecuting]) { 70 | [self startAnimating]; 71 | } else { 72 | [self stopAnimating]; 73 | } 74 | 75 | [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingOperationDidStartNotification object:operation]; 76 | [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingOperationDidFinishNotification object:operation]; 77 | } 78 | } 79 | } 80 | 81 | #pragma mark - 82 | 83 | - (void)af_startAnimating { 84 | dispatch_async(dispatch_get_main_queue(), ^{ 85 | [self startAnimating]; 86 | }); 87 | } 88 | 89 | - (void)af_stopAnimating { 90 | dispatch_async(dispatch_get_main_queue(), ^{ 91 | [self stopAnimating]; 92 | }); 93 | } 94 | 95 | @end 96 | 97 | #endif 98 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIKit+AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #ifndef _UIKIT_AFNETWORKING_ 26 | #define _UIKIT_AFNETWORKING_ 27 | 28 | #import "AFNetworkActivityIndicatorManager.h" 29 | 30 | #import "UIActivityIndicatorView+AFNetworking.h" 31 | #import "UIAlertView+AFNetworking.h" 32 | #import "UIButton+AFNetworking.h" 33 | #import "UIImageView+AFNetworking.h" 34 | #import "UIKit+AFNetworking.h" 35 | #import "UIProgressView+AFNetworking.h" 36 | #import "UIRefreshControl+AFNetworking.h" 37 | #import "UIWebView+AFNetworking.h" 38 | #endif /* _UIKIT_AFNETWORKING_ */ 39 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIProgressView+AFNetworking.h 2 | // 3 | // Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #import 26 | 27 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 28 | 29 | #import 30 | 31 | @class AFURLConnectionOperation; 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task or request operation. 35 | */ 36 | @interface UIProgressView (AFNetworking) 37 | 38 | ///------------------------------------ 39 | /// @name Setting Session Task Progress 40 | ///------------------------------------ 41 | 42 | /** 43 | Binds the progress to the upload progress of the specified session task. 44 | 45 | @param task The session task. 46 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 47 | */ 48 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 49 | - (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task 50 | animated:(BOOL)animated; 51 | #endif 52 | 53 | /** 54 | Binds the progress to the download progress of the specified session task. 55 | 56 | @param task The session task. 57 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 58 | */ 59 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 60 | - (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task 61 | animated:(BOOL)animated; 62 | #endif 63 | 64 | ///------------------------------------ 65 | /// @name Setting Session Task Progress 66 | ///------------------------------------ 67 | 68 | /** 69 | Binds the progress to the upload progress of the specified request operation. 70 | 71 | @param operation The request operation. 72 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 73 | */ 74 | - (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation 75 | animated:(BOOL)animated; 76 | 77 | /** 78 | Binds the progress to the download progress of the specified request operation. 79 | 80 | @param operation The request operation. 81 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 82 | */ 83 | - (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation 84 | animated:(BOOL)animated; 85 | 86 | @end 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2014 AFNetworking (http://afnetworking.com) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #import 26 | 27 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 28 | 29 | #import 30 | 31 | @class AFURLConnectionOperation; 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically begining and ending refreshing depending on the loading state of a request operation or session task. 35 | */ 36 | @interface UIRefreshControl (AFNetworking) 37 | 38 | ///----------------------------------- 39 | /// @name Refreshing for Session Tasks 40 | ///----------------------------------- 41 | 42 | /** 43 | Binds the refreshing state to the state of the specified task. 44 | 45 | @param task The task. If `nil`, automatic updating from any previously specified operation will be diabled. 46 | */ 47 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 48 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; 49 | #endif 50 | 51 | ///---------------------------------------- 52 | /// @name Refreshing for Request Operations 53 | ///---------------------------------------- 54 | 55 | /** 56 | Binds the refreshing state to the execution state of the specified operation. 57 | 58 | @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. 59 | */ 60 | - (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation; 61 | 62 | @end 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2014 AFNetworking (http://afnetworking.com) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "UIRefreshControl+AFNetworking.h" 24 | 25 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 26 | 27 | #import "AFHTTPRequestOperation.h" 28 | 29 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 30 | #import "AFURLSessionManager.h" 31 | #endif 32 | 33 | @implementation UIRefreshControl (AFNetworking) 34 | 35 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 36 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { 37 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 38 | 39 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 40 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 41 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 42 | 43 | if (task) { 44 | if (task.state != NSURLSessionTaskStateCompleted) { 45 | if (task.state == NSURLSessionTaskStateRunning) { 46 | [self beginRefreshing]; 47 | } else { 48 | [self endRefreshing]; 49 | } 50 | 51 | [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task]; 52 | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task]; 53 | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task]; 54 | } 55 | } 56 | } 57 | #endif 58 | 59 | - (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation { 60 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 61 | 62 | [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; 63 | [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; 64 | 65 | if (operation) { 66 | if (![operation isFinished]) { 67 | if ([operation isExecuting]) { 68 | [self beginRefreshing]; 69 | } else { 70 | [self endRefreshing]; 71 | } 72 | 73 | [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingOperationDidStartNotification object:operation]; 74 | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingOperationDidFinishNotification object:operation]; 75 | } 76 | } 77 | } 78 | 79 | #pragma mark - 80 | 81 | - (void)af_beginRefreshing { 82 | dispatch_async(dispatch_get_main_queue(), ^{ 83 | [self beginRefreshing]; 84 | }); 85 | } 86 | 87 | - (void)af_endRefreshing { 88 | dispatch_async(dispatch_get_main_queue(), ^{ 89 | [self endRefreshing]; 90 | }); 91 | } 92 | 93 | @end 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperationManager.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFURLConnectionOperation.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/UIAlertView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/MWFeedParser/GTMNSString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/GTMNSString+HTML.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/MWFeedParser/MWFeedInfo.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/MWFeedInfo.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/MWFeedParser/MWFeedItem.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/MWFeedItem.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/MWFeedParser/MWFeedParser.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/MWFeedParser.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/MWFeedParser/MWFeedParser_Private.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/MWFeedParser_Private.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/MWFeedParser/NSDate+InternetDateTime.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/NSDate+InternetDateTime.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/BuildHeaders/MWFeedParser/NSString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/NSString+HTML.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/AFHTTPRequestOperation.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/AFHTTPRequestOperationManager.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/AFURLConnectionOperation.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFURLConnectionOperation.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/UIAlertView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/MWFeedParser/GTMNSString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/GTMNSString+HTML.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/MWFeedParser/MWFeedInfo.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/MWFeedInfo.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/MWFeedParser/MWFeedItem.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/MWFeedItem.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/MWFeedParser/MWFeedParser.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/MWFeedParser.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/MWFeedParser/MWFeedParser_Private.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/MWFeedParser_Private.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/MWFeedParser/NSDate+InternetDateTime.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/NSDate+InternetDateTime.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Headers/MWFeedParser/NSString+HTML.h: -------------------------------------------------------------------------------- 1 | ../../MWFeedParser/Classes/NSString+HTML.h -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/MWFeedParser/Classes/GTMNSString+HTML.h: -------------------------------------------------------------------------------- 1 | // 2 | // GTMNSString+HTML.h 3 | // Dealing with NSStrings that contain HTML 4 | // 5 | // Copyright 2006-2008 Google Inc. 6 | // 7 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not 8 | // use this file except in compliance with the License. You may obtain a copy 9 | // of the License at 10 | // 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 15 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 16 | // License for the specific language governing permissions and limitations under 17 | // the License. 18 | // 19 | 20 | #import 21 | 22 | /// Utilities for NSStrings containing HTML 23 | @interface NSString (GTMNSStringHTMLAdditions) 24 | 25 | /// Get a string where internal characters that need escaping for HTML are escaped 26 | // 27 | /// For example, '&' become '&'. This will only cover characters from table 28 | /// A.2.2 of http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters 29 | /// which is what you want for a unicode encoded webpage. If you have a ascii 30 | /// or non-encoded webpage, please use stringByEscapingAsciiHTML which will 31 | /// encode all characters. 32 | /// 33 | /// For obvious reasons this call is only safe once. 34 | // 35 | // Returns: 36 | // Autoreleased NSString 37 | // 38 | - (NSString *)gtm_stringByEscapingForHTML; 39 | 40 | /// Get a string where internal characters that need escaping for HTML are escaped 41 | // 42 | /// For example, '&' become '&' 43 | /// All non-mapped characters (unicode that don't have a &keyword; mapping) 44 | /// will be converted to the appropriate &#xxx; value. If your webpage is 45 | /// unicode encoded (UTF16 or UTF8) use stringByEscapingHTML instead as it is 46 | /// faster, and produces less bloated and more readable HTML (as long as you 47 | /// are using a unicode compliant HTML reader). 48 | /// 49 | /// For obvious reasons this call is only safe once. 50 | // 51 | // Returns: 52 | // Autoreleased NSString 53 | // 54 | - (NSString *)gtm_stringByEscapingForAsciiHTML; 55 | 56 | /// Get a string where internal characters that are escaped for HTML are unescaped 57 | // 58 | /// For example, '&' becomes '&' 59 | /// Handles and 2 cases as well 60 | /// 61 | // Returns: 62 | // Autoreleased NSString 63 | // 64 | - (NSString *)gtm_stringByUnescapingFromHTML; 65 | 66 | @end -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/MWFeedParser/Classes/MWFeedInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // MWFeedInfo.h 3 | // MWFeedParser 4 | // 5 | // Copyright (c) 2010 Michael Waterfall 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // 1. The above copyright notice and this permission notice shall be included 15 | // in all copies or substantial portions of the Software. 16 | // 17 | // 2. This Software cannot be used to archive or collect data such as (but not 18 | // limited to) that of events, news, experiences and activities, for the 19 | // purpose of any concept relating to diary/journal keeping. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | // 29 | 30 | #import 31 | 32 | @interface MWFeedInfo : NSObject { 33 | 34 | NSString *title; // Feed title 35 | NSString *link; // Feed link 36 | NSString *summary; // Feed summary / description 37 | NSURL *url; // Feed url 38 | 39 | } 40 | 41 | @property (nonatomic, copy) NSString *title; 42 | @property (nonatomic, copy) NSString *link; 43 | @property (nonatomic, copy) NSString *summary; 44 | @property (nonatomic, copy) NSURL *url; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/MWFeedParser/Classes/MWFeedInfo.m: -------------------------------------------------------------------------------- 1 | // 2 | // MWFeedInfo.m 3 | // MWFeedParser 4 | // 5 | // Copyright (c) 2010 Michael Waterfall 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // 1. The above copyright notice and this permission notice shall be included 15 | // in all copies or substantial portions of the Software. 16 | // 17 | // 2. This Software cannot be used to archive or collect data such as (but not 18 | // limited to) that of events, news, experiences and activities, for the 19 | // purpose of any concept relating to diary/journal keeping. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | // 29 | 30 | #import "MWFeedInfo.h" 31 | 32 | #define EXCERPT(str, len) (([str length] > len) ? [[str substringToIndex:len-1] stringByAppendingString:@"…"] : str) 33 | 34 | @implementation MWFeedInfo 35 | 36 | @synthesize title, link, summary, url; 37 | 38 | #pragma mark NSObject 39 | 40 | - (NSString *)description { 41 | NSMutableString *string = [[NSMutableString alloc] initWithString:@"MWFeedInfo: "]; 42 | if (title) [string appendFormat:@"“%@”", EXCERPT(title, 50)]; 43 | //if (link) [string appendFormat:@" (%@)", link]; 44 | //if (summary) [string appendFormat:@", %@", MWExcerpt(summary, 50)]; 45 | return string; 46 | } 47 | 48 | 49 | #pragma mark NSCoding 50 | 51 | - (id)initWithCoder:(NSCoder *)decoder { 52 | if ((self = [super init])) { 53 | title = [decoder decodeObjectForKey:@"title"]; 54 | link = [decoder decodeObjectForKey:@"link"]; 55 | summary = [decoder decodeObjectForKey:@"summary"]; 56 | url = [decoder decodeObjectForKey:@"url"]; 57 | } 58 | return self; 59 | } 60 | 61 | - (void)encodeWithCoder:(NSCoder *)encoder { 62 | if (title) [encoder encodeObject:title forKey:@"title"]; 63 | if (link) [encoder encodeObject:link forKey:@"link"]; 64 | if (summary) [encoder encodeObject:summary forKey:@"summary"]; 65 | if (url) [encoder encodeObject:url forKey:@"url"]; 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/MWFeedParser/Classes/MWFeedItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // MWFeedItem.h 3 | // MWFeedParser 4 | // 5 | // Copyright (c) 2010 Michael Waterfall 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // 1. The above copyright notice and this permission notice shall be included 15 | // in all copies or substantial portions of the Software. 16 | // 17 | // 2. This Software cannot be used to archive or collect data such as (but not 18 | // limited to) that of events, news, experiences and activities, for the 19 | // purpose of any concept relating to diary/journal keeping. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | // 29 | 30 | #import 31 | 32 | @interface MWFeedItem : NSObject { 33 | 34 | NSString *identifier; // Item identifier 35 | NSString *title; // Item title 36 | NSString *link; // Item URL 37 | NSDate *date; // Date the item was published 38 | NSDate *updated; // Date the item was updated if available 39 | NSString *summary; // Description of item 40 | NSString *content; // More detailed content (if available) 41 | NSString *author; // Item author 42 | 43 | // Enclosures: Holds 1 or more item enclosures (i.e. podcasts, mp3. pdf, etc) 44 | // - NSArray of NSDictionaries with the following keys: 45 | // url: where the enclosure is located (NSString) 46 | // length: how big it is in bytes (NSNumber) 47 | // type: what its type is, a standard MIME type (NSString) 48 | NSArray *enclosures; 49 | 50 | } 51 | 52 | @property (nonatomic, copy) NSString *identifier; 53 | @property (nonatomic, copy) NSString *title; 54 | @property (nonatomic, copy) NSString *link; 55 | @property (nonatomic, copy) NSDate *date; 56 | @property (nonatomic, copy) NSDate *updated; 57 | @property (nonatomic, copy) NSString *summary; 58 | @property (nonatomic, copy) NSString *content; 59 | @property (nonatomic, copy) NSString *author; 60 | @property (nonatomic, copy) NSArray *enclosures; 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/MWFeedParser/Classes/MWFeedItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // MWFeedItem.m 3 | // MWFeedParser 4 | // 5 | // Copyright (c) 2010 Michael Waterfall 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // 1. The above copyright notice and this permission notice shall be included 15 | // in all copies or substantial portions of the Software. 16 | // 17 | // 2. This Software cannot be used to archive or collect data such as (but not 18 | // limited to) that of events, news, experiences and activities, for the 19 | // purpose of any concept relating to diary/journal keeping. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | // 29 | 30 | #import "MWFeedItem.h" 31 | 32 | #define EXCERPT(str, len) (([str length] > len) ? [[str substringToIndex:len-1] stringByAppendingString:@"…"] : str) 33 | 34 | @implementation MWFeedItem 35 | 36 | @synthesize identifier, title, link, date, updated, summary, content, author, enclosures; 37 | 38 | #pragma mark NSObject 39 | 40 | - (NSString *)description { 41 | NSMutableString *string = [[NSMutableString alloc] initWithString:@"MWFeedItem: "]; 42 | if (title) [string appendFormat:@"“%@”", EXCERPT(title, 50)]; 43 | if (date) [string appendFormat:@" - %@", date]; 44 | //if (link) [string appendFormat:@" (%@)", link]; 45 | //if (summary) [string appendFormat:@", %@", EXCERPT(summary, 50)]; 46 | return string; 47 | } 48 | 49 | 50 | #pragma mark NSCoding 51 | 52 | - (id)initWithCoder:(NSCoder *)decoder { 53 | if ((self = [super init])) { 54 | identifier = [decoder decodeObjectForKey:@"identifier"]; 55 | title = [decoder decodeObjectForKey:@"title"]; 56 | link = [decoder decodeObjectForKey:@"link"]; 57 | date = [decoder decodeObjectForKey:@"date"]; 58 | updated = [decoder decodeObjectForKey:@"updated"]; 59 | summary = [decoder decodeObjectForKey:@"summary"]; 60 | content = [decoder decodeObjectForKey:@"content"]; 61 | author = [decoder decodeObjectForKey:@"author"]; 62 | enclosures = [decoder decodeObjectForKey:@"enclosures"]; 63 | } 64 | return self; 65 | } 66 | 67 | - (void)encodeWithCoder:(NSCoder *)encoder { 68 | if (identifier) [encoder encodeObject:identifier forKey:@"identifier"]; 69 | if (title) [encoder encodeObject:title forKey:@"title"]; 70 | if (link) [encoder encodeObject:link forKey:@"link"]; 71 | if (date) [encoder encodeObject:date forKey:@"date"]; 72 | if (updated) [encoder encodeObject:updated forKey:@"updated"]; 73 | if (summary) [encoder encodeObject:summary forKey:@"summary"]; 74 | if (content) [encoder encodeObject:content forKey:@"content"]; 75 | if (author) [encoder encodeObject:author forKey:@"author"]; 76 | if (enclosures) [encoder encodeObject:enclosures forKey:@"enclosures"]; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/MWFeedParser/Classes/MWFeedParser_Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // MWFeedParser_Private.h 3 | // MWFeedParser 4 | // 5 | // Copyright (c) 2010 Michael Waterfall 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // 1. The above copyright notice and this permission notice shall be included 15 | // in all copies or substantial portions of the Software. 16 | // 17 | // 2. This Software cannot be used to archive or collect data such as (but not 18 | // limited to) that of events, news, experiences and activities, for the 19 | // purpose of any concept relating to diary/journal keeping. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | // 29 | 30 | @interface MWFeedParser () 31 | 32 | #pragma mark Private Properties 33 | 34 | // Feed Downloading Properties 35 | @property (nonatomic, copy) NSURL *url; 36 | @property (nonatomic, strong) NSURLRequest *request; 37 | @property (nonatomic, strong) NSURLConnection *urlConnection; 38 | @property (nonatomic, strong) NSMutableData *asyncData; 39 | @property (nonatomic, strong) NSString *asyncTextEncodingName; 40 | 41 | // Parsing Properties 42 | @property (nonatomic, strong) NSXMLParser *feedParser; 43 | @property (nonatomic, strong) NSString *currentPath; 44 | @property (nonatomic, strong) NSMutableString *currentText; 45 | @property (nonatomic, strong) NSDictionary *currentElementAttributes; 46 | @property (nonatomic, strong) MWFeedItem *item; 47 | @property (nonatomic, strong) MWFeedInfo *info; 48 | @property (nonatomic, copy) NSString *pathOfElementWithXHTMLType; 49 | 50 | #pragma mark Private Methods 51 | 52 | // Parsing Methods 53 | - (void)reset; 54 | - (void)abortParsingEarly; 55 | - (void)parsingFinished; 56 | - (void)parsingFailedWithErrorCode:(int)code andDescription:(NSString *)description; 57 | - (void)startParsingData:(NSData *)data textEncodingName:(NSString *)textEncodingName; 58 | 59 | // Dispatching to Delegate 60 | - (void)dispatchFeedInfoToDelegate; 61 | - (void)dispatchFeedItemToDelegate; 62 | 63 | // Error Handling 64 | 65 | // Misc 66 | - (BOOL)createEnclosureFromAttributes:(NSDictionary *)attributes andAddToItem:(MWFeedItem *)currentItem; 67 | - (BOOL)processAtomLink:(NSDictionary *)attributes andAddToMWObject:(id)MWObject; 68 | 69 | @end -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/MWFeedParser/Classes/NSDate+InternetDateTime.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+InternetDateTime.h 3 | // MWFeedParser 4 | // 5 | // Created by Michael Waterfall on 07/10/2010. 6 | // Copyright 2010 Michael Waterfall. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // Formatting hints 12 | typedef enum { 13 | DateFormatHintNone, 14 | DateFormatHintRFC822, 15 | DateFormatHintRFC3339 16 | } DateFormatHint; 17 | 18 | // A category to parse internet date & time strings 19 | @interface NSDate (InternetDateTime) 20 | 21 | // Get date from RFC3339 or RFC822 string 22 | // - A format/specification hint can be used to speed up, 23 | // otherwise both will be attempted in order to get a date 24 | + (NSDate *)dateFromInternetDateTimeString:(NSString *)dateString 25 | formatHint:(DateFormatHint)hint; 26 | 27 | // Get date from a string using a specific date specification 28 | + (NSDate *)dateFromRFC3339String:(NSString *)dateString; 29 | + (NSDate *)dateFromRFC822String:(NSString *)dateString; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/MWFeedParser/Classes/NSString+HTML.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+HTML.h 3 | // MWFeedParser 4 | // 5 | // Copyright (c) 2010 Michael Waterfall 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // 1. The above copyright notice and this permission notice shall be included 15 | // in all copies or substantial portions of the Software. 16 | // 17 | // 2. This Software cannot be used to archive or collect data such as (but not 18 | // limited to) that of events, news, experiences and activities, for the 19 | // purpose of any concept relating to diary/journal keeping. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | // 29 | 30 | #import 31 | 32 | // Dependant upon GTMNSString+HTML 33 | 34 | @interface NSString (HTML) 35 | 36 | // Strips HTML tags & comments, removes extra whitespace and decodes HTML character entities. 37 | - (NSString *)stringByConvertingHTMLToPlainText; 38 | 39 | // Decode all HTML entities using GTM. 40 | - (NSString *)stringByDecodingHTMLEntities; 41 | 42 | // Encode all HTML entities using GTM. 43 | - (NSString *)stringByEncodingHTMLEntities; 44 | 45 | // Minimal unicode encoding will only cover characters from table 46 | // A.2.2 of http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters 47 | // which is what you want for a unicode encoded webpage. 48 | - (NSString *)stringByEncodingHTMLEntities:(BOOL)isUnicode; 49 | 50 | // Replace newlines with
tags. 51 | - (NSString *)stringWithNewLinesAsBRs; 52 | 53 | // Remove newlines and white space from string. 54 | - (NSString *)stringByRemovingNewLinesAndWhitespace; 55 | 56 | // Wrap plain URLs in ... 57 | // - Ignores URLs inside tags (any URL beginning with =") 58 | // - HTTP & HTTPS schemes only 59 | // - Only works in iOS 4+ as we use NSRegularExpression (returns self if not supported so be careful with NSMutableStrings) 60 | // - Expression: (? 2 | @interface PodsDummy_Pods_AFNetworking : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_AFNetworking 5 | @end 6 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods-AFNetworking-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods-AFNetworking.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_AFNETWORKING_OTHER_LDFLAGS = -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods-MWFeedParser-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-MWFeedParser.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/MWFeedParser" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/MWFeedParser" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods-MWFeedParser-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_MWFeedParser : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_MWFeedParser 5 | @end 6 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods-MWFeedParser-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods-MWFeedParser.xcconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/Swift-RSSFeed/Pods/Pods-MWFeedParser.xcconfig -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AFNetworking 5 | 6 | Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com/) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## MWFeedParser 28 | 29 | Copyright (c) 2010 Michael Waterfall 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy 32 | of this software and associated documentation files (the "Software"), to deal 33 | in the Software without restriction, including without limitation the rights 34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 35 | copies of the Software, and to permit persons to whom the Software is 36 | furnished to do so, subject to the following conditions: 37 | 38 | 1. The above copyright notice and this permission notice shall be included 39 | in all copies or substantial portions of the Software. 40 | 41 | 2. This Software cannot be used to archive or collect data such as (but not 42 | limited to) that of events, news, experiences and activities, for the 43 | purpose of any concept relating to diary/journal keeping. 44 | 45 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 46 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 47 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 48 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 49 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 50 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 51 | THE SOFTWARE. 52 | Generated by CocoaPods - http://cocoapods.org 53 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2013-2014 AFNetworking (http://afnetworking.com/) 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | AFNetworking 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Copyright (c) 2010 Michael Waterfall 45 | 46 | Permission is hereby granted, free of charge, to any person obtaining a copy 47 | of this software and associated documentation files (the "Software"), to deal 48 | in the Software without restriction, including without limitation the rights 49 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 50 | copies of the Software, and to permit persons to whom the Software is 51 | furnished to do so, subject to the following conditions: 52 | 53 | 1. The above copyright notice and this permission notice shall be included 54 | in all copies or substantial portions of the Software. 55 | 56 | 2. This Software cannot be used to archive or collect data such as (but not 57 | limited to) that of events, news, experiences and activities, for the 58 | purpose of any concept relating to diary/journal keeping. 59 | 60 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 61 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 62 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 63 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 64 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 65 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 66 | THE SOFTWARE. 67 | Title 68 | MWFeedParser 69 | Type 70 | PSGroupSpecifier 71 | 72 | 73 | FooterText 74 | Generated by CocoaPods - http://cocoapods.org 75 | Title 76 | 77 | Type 78 | PSGroupSpecifier 79 | 80 | 81 | StringsTable 82 | Acknowledgements 83 | Title 84 | Acknowledgements 85 | 86 | 87 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // AFNetworking 10 | #define COCOAPODS_POD_AVAILABLE_AFNetworking 11 | #define COCOAPODS_VERSION_MAJOR_AFNetworking 2 12 | #define COCOAPODS_VERSION_MINOR_AFNetworking 3 13 | #define COCOAPODS_VERSION_PATCH_AFNetworking 1 14 | 15 | // AFNetworking/NSURLConnection 16 | #define COCOAPODS_POD_AVAILABLE_AFNetworking_NSURLConnection 17 | #define COCOAPODS_VERSION_MAJOR_AFNetworking_NSURLConnection 2 18 | #define COCOAPODS_VERSION_MINOR_AFNetworking_NSURLConnection 3 19 | #define COCOAPODS_VERSION_PATCH_AFNetworking_NSURLConnection 1 20 | 21 | // AFNetworking/NSURLSession 22 | #define COCOAPODS_POD_AVAILABLE_AFNetworking_NSURLSession 23 | #define COCOAPODS_VERSION_MAJOR_AFNetworking_NSURLSession 2 24 | #define COCOAPODS_VERSION_MINOR_AFNetworking_NSURLSession 3 25 | #define COCOAPODS_VERSION_PATCH_AFNetworking_NSURLSession 1 26 | 27 | // AFNetworking/Reachability 28 | #define COCOAPODS_POD_AVAILABLE_AFNetworking_Reachability 29 | #define COCOAPODS_VERSION_MAJOR_AFNetworking_Reachability 2 30 | #define COCOAPODS_VERSION_MINOR_AFNetworking_Reachability 3 31 | #define COCOAPODS_VERSION_PATCH_AFNetworking_Reachability 1 32 | 33 | // AFNetworking/Security 34 | #define COCOAPODS_POD_AVAILABLE_AFNetworking_Security 35 | #define COCOAPODS_VERSION_MAJOR_AFNetworking_Security 2 36 | #define COCOAPODS_VERSION_MINOR_AFNetworking_Security 3 37 | #define COCOAPODS_VERSION_PATCH_AFNetworking_Security 1 38 | 39 | // AFNetworking/Serialization 40 | #define COCOAPODS_POD_AVAILABLE_AFNetworking_Serialization 41 | #define COCOAPODS_VERSION_MAJOR_AFNetworking_Serialization 2 42 | #define COCOAPODS_VERSION_MINOR_AFNetworking_Serialization 3 43 | #define COCOAPODS_VERSION_PATCH_AFNetworking_Serialization 1 44 | 45 | // AFNetworking/UIKit 46 | #define COCOAPODS_POD_AVAILABLE_AFNetworking_UIKit 47 | #define COCOAPODS_VERSION_MAJOR_AFNetworking_UIKit 2 48 | #define COCOAPODS_VERSION_MINOR_AFNetworking_UIKit 3 49 | #define COCOAPODS_VERSION_PATCH_AFNetworking_UIKit 1 50 | 51 | // MWFeedParser 52 | #define COCOAPODS_POD_AVAILABLE_MWFeedParser 53 | #define COCOAPODS_VERSION_MAJOR_MWFeedParser 1 54 | #define COCOAPODS_VERSION_MINOR_MWFeedParser 0 55 | #define COCOAPODS_VERSION_PATCH_MWFeedParser 1 56 | 57 | // MWFeedParser/FeedParser 58 | #define COCOAPODS_POD_AVAILABLE_MWFeedParser_FeedParser 59 | #define COCOAPODS_VERSION_MAJOR_MWFeedParser_FeedParser 1 60 | #define COCOAPODS_VERSION_MINOR_MWFeedParser_FeedParser 0 61 | #define COCOAPODS_VERSION_PATCH_MWFeedParser_FeedParser 1 62 | 63 | // MWFeedParser/NSDate+InternetDateTime 64 | #define COCOAPODS_POD_AVAILABLE_MWFeedParser_NSDate_InternetDateTime 65 | #define COCOAPODS_VERSION_MAJOR_MWFeedParser_NSDate_InternetDateTime 1 66 | #define COCOAPODS_VERSION_MINOR_MWFeedParser_NSDate_InternetDateTime 0 67 | #define COCOAPODS_VERSION_PATCH_MWFeedParser_NSDate_InternetDateTime 1 68 | 69 | // MWFeedParser/NSString+HTML 70 | #define COCOAPODS_POD_AVAILABLE_MWFeedParser_NSString_HTML 71 | #define COCOAPODS_VERSION_MAJOR_MWFeedParser_NSString_HTML 1 72 | #define COCOAPODS_VERSION_MINOR_MWFeedParser_NSString_HTML 0 73 | #define COCOAPODS_VERSION_PATCH_MWFeedParser_NSString_HTML 1 74 | 75 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 5 | > "$RESOURCES_TO_COPY" 6 | 7 | install_resource() 8 | { 9 | case $1 in 10 | *.storyboard) 11 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 12 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 13 | ;; 14 | *.xib) 15 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 16 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 17 | ;; 18 | *.framework) 19 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 21 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 22 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 23 | ;; 24 | *.xcdatamodel) 25 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 26 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 27 | ;; 28 | *.xcdatamodeld) 29 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 30 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 31 | ;; 32 | *.xcassets) 33 | ;; 34 | /*) 35 | echo "$1" 36 | echo "$1" >> "$RESOURCES_TO_COPY" 37 | ;; 38 | *) 39 | echo "${PODS_ROOT}/$1" 40 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 41 | ;; 42 | esac 43 | } 44 | 45 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 46 | if [[ "${ACTION}" == "install" ]]; then 47 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 48 | fi 49 | rm -f "$RESOURCES_TO_COPY" 50 | 51 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ `xcrun --find actool` ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] 52 | then 53 | case "${TARGETED_DEVICE_FAMILY}" in 54 | 1,2) 55 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 56 | ;; 57 | 1) 58 | TARGET_DEVICE_ARGS="--target-device iphone" 59 | ;; 60 | 2) 61 | TARGET_DEVICE_ARGS="--target-device ipad" 62 | ;; 63 | *) 64 | TARGET_DEVICE_ARGS="--target-device mac" 65 | ;; 66 | esac 67 | find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 68 | fi 69 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/AFNetworking" "${PODS_ROOT}/Headers/MWFeedParser" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers" -isystem "${PODS_ROOT}/Headers/AFNetworking" -isystem "${PODS_ROOT}/Headers/MWFeedParser" 4 | OTHER_LDFLAGS = -ObjC -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration 5 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/Pods-AFNetworking.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/Pods-MWFeedParser.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/Pods.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Swift-RSSFeed/Pods/Pods.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-AFNetworking.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods-MWFeedParser.xcscheme 13 | 14 | isShown 15 | 16 | 17 | Pods.xcscheme 18 | 19 | isShown 20 | 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | 00B422E632FA4D5C959A9A84 26 | 27 | primary 28 | 29 | 30 | 06AA1F9E0A7A48B3A25D241B 31 | 32 | primary 33 | 34 | 35 | B8A34A2EABF24DE6B6DC9120 36 | 37 | primary 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Swift-RSSFeed/README.md: -------------------------------------------------------------------------------- 1 | Swift-RSSFeed 2 | ============= 3 | 4 | A Sample RSS reader in Swift 5 | 6 | 7 | Cocoapods with Swift 8 | ======================= 9 | How to integrate Cocoapods into Swift project ???????? 10 | 11 | Please Checked My blogpost Related with **Cocoapods + Swift** 12 | + https://medium.com/@jigarm/cocoapods-with-swift-93bd373a7111 13 | 14 | This Sample Project includes : 15 | ================================================== 16 | 17 | + How to use CocoaPods with Swift 18 | + RSSFeed 19 | + GDC (Grand Dispatch Center) 20 | + Methods & Properties 21 | + Closure 22 | 23 | ### App Previews 24 | ==================== 25 | 26 | Appicon : 27 | 28 | ![](http://i1282.photobucket.com/albums/a534/jigarm_0809/iOSSimulatorScreenShot06-Aug-201493049pm_zpsdce73bf0.png) 29 | 30 | RSSFeed UITableView : 31 | 32 | ![](http://i1282.photobucket.com/albums/a534/jigarm_0809/iOSSimulatorScreenShot06-Aug-201493043pm_zpsdfe6345b.png) 33 | 34 | RSSFeed Detailview : 35 | 36 | ![](http://i1282.photobucket.com/albums/a534/jigarm_0809/iOSSimulatorScreenShot06-Aug-201494224pm_zps81ba982d.png) 37 | 38 | 39 | 40 | ============================ 41 |

Require

42 | OSX 10.9.3 and Xcode 6.x (beta for now) 43 | 44 | Swift 45 | --- 46 | 47 | This project will highlight a few of the core language features about Swift, but I would read through these documents, I found them useful to learn more about Swift and understanding teh structure and syntax of the language: 48 | 49 | * [__Apple Documentation__](https://developer.apple.com/library/prerelease/ios/documentation/swift/conceptual/swift_programming_language/index.html) 50 | * [__Download the iBook__](https://itunes.apple.com/us/book/the-swift-programming-language/id881256329?mt=11) 51 | * [__Swift Cheat Sheet__](https://github.com/grant/swift-cheat-sheet) 52 | * [__Swift Language Highlights by Matt Galloway__](http://www.raywenderlich.com/73997/swift-language-highlights) 53 | 54 | 55 | ## License 56 | 57 | The MIT License (MIT) 58 | 59 | Copyright (c) 2014 Jigar M 60 | 61 | Permission is hereby granted, free of charge, to any person obtaining a copy 62 | of this software and associated documentation files (the "Software"), to deal 63 | in the Software without restriction, including without limitation the rights 64 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 65 | copies of the Software, and to permit persons to whom the Software is 66 | furnished to do so, subject to the following conditions: 67 | 68 | The above copyright notice and this permission notice shall be included in all 69 | copies or substantial portions of the Software. 70 | 71 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 72 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 73 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 74 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 75 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 76 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 77 | SOFTWARE. 78 | -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder-Bridging-Header.m: -------------------------------------------------------------------------------- 1 | // 2 | // RSSFeeder-Bridging-Header.m 3 | // RSSFeeder 4 | // 5 | // Created by Mobmaxime on 06/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MWFeedParser.h" 11 | #import 12 | -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder.xcodeproj/project.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/Swift-RSSFeed/RSSFeeder.xcodeproj/project.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/RSSFeeder.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | RSSFeeder.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8DF5BCC51990EA9E00AB7052 16 | 17 | primary 18 | 19 | 20 | 8DF5BCD71990EA9E00AB7052 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/Swift-RSSFeed/RSSFeeder.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // RSSFeeder 4 | // 5 | // Created by Jigar M on 05/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/Images.xcassets/AppIcon.appiconset/120 x 120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/Swift-RSSFeed/RSSFeeder/Images.xcassets/AppIcon.appiconset/120 x 120.png -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/Images.xcassets/AppIcon.appiconset/58 x 58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/Swift-RSSFeed/RSSFeeder/Images.xcassets/AppIcon.appiconset/58 x 58.png -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/Images.xcassets/AppIcon.appiconset/80 x 80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/Swift-RSSFeed/RSSFeeder/Images.xcassets/AppIcon.appiconset/80 x 80.png -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "58 x 58.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "40x40", 11 | "idiom" : "iphone", 12 | "filename" : "80 x 80.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "60x60", 17 | "idiom" : "iphone", 18 | "filename" : "120 x 120.png", 19 | "scale" : "2x" 20 | } 21 | ], 22 | "info" : { 23 | "version" : 1, 24 | "author" : "xcode" 25 | } 26 | } -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "filename" : "Default@2x .png", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "extent" : "full-screen", 13 | "idiom" : "iphone", 14 | "subtype" : "retina4", 15 | "filename" : "Default-568h@2x.png", 16 | "minimum-system-version" : "7.0", 17 | "orientation" : "portrait", 18 | "scale" : "2x" 19 | } 20 | ], 21 | "info" : { 22 | "version" : 1, 23 | "author" : "xcode" 24 | } 25 | } -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/Swift-RSSFeed/RSSFeeder/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/Images.xcassets/LaunchImage.launchimage/Default@2x .png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/Swift-RSSFeed/RSSFeeder/Images.xcassets/LaunchImage.launchimage/Default@2x .png -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.jigarm.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/MyTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewCell.swift 3 | // RSSFeeder 4 | // 5 | // Created by Jigar M on 05/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MyTableViewCell: UITableViewCell { 12 | @IBOutlet var img : UIImageView 13 | @IBOutlet var FeedLbl : UILabel 14 | @IBOutlet var timestamp : UILabel 15 | } 16 | -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/MyTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewController.swift 3 | // RSSFeeder 4 | // 5 | // Created by Jigar M on 05/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MyTableViewController: UITableViewController, MWFeedParserDelegate { 12 | 13 | var items = MWFeedItem[]() 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | } 18 | 19 | override func viewWillAppear(animated: Bool) { 20 | super.viewWillAppear(animated) 21 | request() 22 | } 23 | 24 | func request() { 25 | let URL = NSURL(string: "https://in.news.yahoo.com/rss/") 26 | let feedParser = MWFeedParser(feedURL: URL); 27 | feedParser.delegate = self 28 | feedParser.feedParseType = ParseTypeFull 29 | feedParser.parse() 30 | } 31 | 32 | func feedParserDidStart(parser: MWFeedParser) { 33 | UIApplication.sharedApplication().networkActivityIndicatorVisible = true; 34 | self.items = MWFeedItem[]() 35 | } 36 | 37 | func feedParserDidFinish(parser: MWFeedParser) { 38 | UIApplication.sharedApplication().networkActivityIndicatorVisible = true; 39 | self.tableView.reloadData() 40 | } 41 | 42 | 43 | func feedParser(parser: MWFeedParser, didParseFeedInfo info: MWFeedInfo) { 44 | //println(info) 45 | self.title = info.title 46 | } 47 | 48 | func feedParser(parser: MWFeedParser, didParseFeedItem item: MWFeedItem) { 49 | //println(item) 50 | self.items.append(item) 51 | } 52 | 53 | // #pragma mark - Table view data source 54 | override func numberOfSectionsInTableView(tableView: UITableView?) -> Int { 55 | return 1 56 | } 57 | 58 | override func tableView(tableView: UITableView?, numberOfRowsInSection section: Int) -> Int { 59 | return self.items.count 60 | } 61 | 62 | override func tableView(tableView: UITableView!, heightForRowAtIndexPath indexPath: NSIndexPath!) -> CGFloat { 63 | return 80 64 | } 65 | 66 | override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell? { 67 | let cell:MyTableViewCell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as MyTableViewCell 68 | 69 | // Configure the cell... 70 | let item = self.items[indexPath.row] as MWFeedItem 71 | //println(item.summary) 72 | cell.FeedLbl.text = item.title 73 | cell.FeedLbl.font = UIFont.systemFontOfSize(14.0) 74 | cell.FeedLbl.numberOfLines = 0 75 | cell.timestamp.text = item.date.description 76 | cell.img.image = UIImage(named:"a.png") 77 | //var projectURL:String = item.summary.componentsSeparatedByString(" Bool{ 44 | NSLog("Loading URL :%@",request.URL.absoluteString); 45 | return true; 46 | } 47 | 48 | func webView(_webView: UIWebView!, 49 | didFailLoadWithError error: NSError!) { 50 | NSLog("Failed to load with error :%@",error.debugDescription); 51 | } 52 | 53 | /* 54 | // #pragma mark - Navigation 55 | 56 | // In a storyboard-based application, you will often want to do a little preparation before navigation 57 | override func prepareForSegue(segue: UIStoryboardSegue?, sender: AnyObject?) { 58 | // Get the new view controller using [segue destinationViewController]. 59 | // Pass the selected object to the new view controller. 60 | } 61 | */ 62 | 63 | } 64 | -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeeder/a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/Swift-RSSFeed/RSSFeeder/a.png -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeederTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.jigarm.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Swift-RSSFeed/RSSFeederTests/RSSFeederTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RSSFeederTests.swift 3 | // RSSFeederTests 4 | // 5 | // Created by Jigar M on 05/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class RSSFeederTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SwiftUITableView/README.md: -------------------------------------------------------------------------------- 1 | SwiftUITableView Using custom Cell 2 | 3 | Simple Tests of Swift Language (no Objective-C) 4 | 5 | + UIButton 6 | + CALayer Property 7 | + GDC (Grand Dispatch Center) 8 | + Use Cirle imageview as Profile Icon 9 | + UseRectangle Imageview with shandow as Profile icon 10 | + UIControlEvents 11 | + Button Target 12 | + Prepareforsegue --> working on it 13 | + Dictionary and Arrays 14 | + UITableView 15 | + NSData / NSUrl --> Working on it 16 | + NSJSONSerialization --> Working on it 17 | + customCell (UITableViewCell) 18 | 19 | 20 |

21 | Rectangle Profile pic Tableview photo RectangleImageTabeview_zps2f5b33f6.png 22 | Detail Screen photo iOSSimulatorScreenShot03-Aug-201483453am_zpsfb875e33.png 23 | Circular Profile pic Tableview photo CircularImageTabeview_zps0afb3e25.png 24 |

25 | 26 |

Require

27 | OSX 10.9.3 and Xcode 6.x (beta for now) 28 | 29 |

LICENSE

30 | 31 | Enjoy! 32 | -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView.xcodeproj/project.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/SwiftUITableView/SwiftUITableView.xcodeproj/project.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView.xcodeproj/xcuserdata/MM.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/SwiftUITableView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SwiftUITableView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8D6F26EC198BAE05000679BA 16 | 17 | primary 18 | 19 | 20 | 8D6F26FE198BAE05000679BA 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SwiftUITableView 4 | // 5 | // Created by Mobmaxime on 01/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView/CustomCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomCell.swift 3 | // SwiftUITableView 4 | // 5 | // Created by Mobmaxime on 01/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Foundation 11 | 12 | class CustomCell: UITableViewCell { 13 | 14 | @IBOutlet var ProfileDP : UIImageView 15 | @IBOutlet var Username : UILabel 16 | @IBOutlet var ScreenName : UILabel 17 | @IBOutlet var Description : UILabel 18 | } 19 | -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView/DetailTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DetailTableViewCell.swift 3 | // SwiftUITableView 4 | // 5 | // Created by Mobmaxime on 03/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class DetailTableViewCell: UITableViewCell { 12 | 13 | @IBOutlet var ProfileDP : UIImageView 14 | @IBOutlet var Recent : UILabel 15 | @IBOutlet var Username : UILabel 16 | @IBOutlet var Timestamp : UILabel 17 | 18 | } 19 | -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView/DetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.swift 3 | // SwiftUITableView 4 | // 5 | // Created by Mobmaxime on 03/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import QuartzCore 11 | 12 | class DetailViewController: UIViewController,UITableViewDelegate, UITableViewDataSource { 13 | 14 | 15 | @IBOutlet var ProfileBannerImage : UIImageView 16 | @IBOutlet var ProfileDPImage : UIImageView 17 | @IBOutlet var Username : UILabel 18 | @IBOutlet var Screenname : UILabel 19 | @IBOutlet var MyTableview : UITableView 20 | var Dict : AnyObject = [] 21 | var list = Array() 22 | //var d : AnyObject 23 | 24 | override func viewDidLoad() { 25 | super.viewDidLoad() 26 | 27 | println(Dict) 28 | 29 | let d = Dict as NSDictionary 30 | let pb = d["ProfileBanner"] as String 31 | ProfileBannerImage.image = UIImage(named:pb) 32 | ProfileDPImage.image = UIImage(named:d["image"] as String) 33 | Username.text = d["Name"] as String 34 | Screenname.text = d["screenname"] as String 35 | 36 | self.title = d["Name"] as String 37 | list = d["recent"] as Array 38 | 39 | //println(list.count) 40 | 41 | var layer:CALayer = ProfileDPImage.layer! 42 | layer.shadowPath = UIBezierPath(rect: layer.bounds).CGPath 43 | layer.shouldRasterize = true; 44 | layer.rasterizationScale = UIScreen.mainScreen().scale 45 | layer.borderColor = UIColor.whiteColor().CGColor 46 | layer.borderWidth = 2.0 47 | layer.shadowColor = UIColor.grayColor().CGColor 48 | layer.shadowOpacity = 0.4 49 | layer.shadowOffset = CGSizeMake(1, 3) 50 | layer.shadowRadius = 1.5 51 | ProfileDPImage.clipsToBounds = false 52 | 53 | 54 | //Tableview Datasource & Delegates 55 | self.MyTableview.dataSource = self 56 | self.MyTableview.delegate = self 57 | } 58 | 59 | // #pragma mark - Table view data source 60 | func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -> Int { 61 | return list.count 62 | } 63 | 64 | func tableView(tableView: UITableView!, heightForRowAtIndexPath indexPath: NSIndexPath!) -> CGFloat { 65 | return 107 66 | } 67 | 68 | func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell { 69 | let cell:DetailTableViewCell = tableView?.dequeueReusableCellWithIdentifier("DetailCell", forIndexPath: indexPath) as DetailTableViewCell 70 | 71 | var data : NSDictionary = self.list[indexPath.row] as NSDictionary 72 | var Username : String = data.objectForKey("Name") as String 73 | var description : String = data.objectForKey("description") as String 74 | var dp : String = data.objectForKey("image") as String 75 | 76 | 77 | /* 78 | Time & Date Formatting 79 | */ 80 | let date = NSDate.date(); // "Jul 23, 2014, 11:01 AM" <-- looks local without seconds. But: 81 | var formatter = NSDateFormatter(); 82 | formatter.dateFormat = "yyyy-MM-dd HH:mm:ss ZZZ"; 83 | let defaultTimeZoneStr = formatter.stringFromDate(date);// "2014-07-23 11:01:35 -0700" <-- same date, local, but with seconds 84 | formatter.timeZone = NSTimeZone(abbreviation: "UTC"); 85 | let utcTimeZoneStr = formatter.stringFromDate(date);// "2014-07-23 18:01:41 +0000" <-- same date, now in UTC 86 | 87 | 88 | cell.Username.text = Username 89 | cell.Timestamp.text = defaultTimeZoneStr 90 | cell.Recent.text = description 91 | cell.ProfileDP.image = UIImage(named:dp) 92 | 93 | return cell 94 | } 95 | 96 | /* 97 | // #pragma mark - Navigation 98 | 99 | // In a storyboard-based application, you will often want to do a little preparation before navigation 100 | override func prepareForSegue(segue: UIStoryboardSegue?, sender: AnyObject?) { 101 | // Get the new view controller using [segue destinationViewController]. 102 | // Pass the selected object to the new view controller. 103 | } 104 | */ 105 | 106 | } 107 | -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.jigarm.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView/female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/SwiftUITableView/SwiftUITableView/female.png -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView/j.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/SwiftUITableView/SwiftUITableView/j.png -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView/male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/SwiftUITableView/SwiftUITableView/male.png -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableView/profile_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/SwiftUITableView/SwiftUITableView/profile_banner.png -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.jigarm.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /SwiftUITableView/SwiftUITableViewTests/SwiftUITableViewTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUITableViewTests.swift 3 | // SwiftUITableViewTests 4 | // 5 | // Created by Mobmaxime on 01/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SwiftUITableViewTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/README.md: -------------------------------------------------------------------------------- 1 | Swift-Tutorials 2 | =============== 3 | 4 | Swift tutorial for New Developer like me 5 | -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample.xcodeproj/project.xcworkspace/xcshareddata/TableViewSample.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 8F33B460-D5F5-4426-9DAA-A70381E9FDF1 9 | IDESourceControlProjectName 10 | TableViewSample 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 2DD735C7-CCFB-4134-B4CC-1790B5999360 14 | https://github.com/JigarM/Swift-Tutorials.git 15 | 16 | IDESourceControlProjectPath 17 | TableView Samples/Simple TableView/TableViewSample.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 2DD735C7-CCFB-4134-B4CC-1790B5999360 21 | ../../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/JigarM/Swift-Tutorials.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 2DD735C7-CCFB-4134-B4CC-1790B5999360 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 2DD735C7-CCFB-4134-B4CC-1790B5999360 36 | IDESourceControlWCCName 37 | Swift-Tutorials 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample.xcodeproj/project.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/TableView Samples/Simple TableView/TableViewSample.xcodeproj/project.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/TableViewSample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TableViewSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8D7D54DB1989B066004B26EF 16 | 17 | primary 18 | 19 | 20 | 8D7D54ED1989B066004B26EF 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TableViewSample 4 | // 5 | // Created by Jigar M on 31/07/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample/Images.xcassets/AppIcon.appiconset/120 x 120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/TableView Samples/Simple TableView/TableViewSample/Images.xcassets/AppIcon.appiconset/120 x 120.png -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample/Images.xcassets/AppIcon.appiconset/58 x 58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/TableView Samples/Simple TableView/TableViewSample/Images.xcassets/AppIcon.appiconset/58 x 58.png -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample/Images.xcassets/AppIcon.appiconset/80 x 80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/TableView Samples/Simple TableView/TableViewSample/Images.xcassets/AppIcon.appiconset/80 x 80.png -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "58 x 58.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "40x40", 11 | "idiom" : "iphone", 12 | "filename" : "80 x 80.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "60x60", 17 | "idiom" : "iphone", 18 | "filename" : "120 x 120.png", 19 | "scale" : "2x" 20 | } 21 | ], 22 | "info" : { 23 | "version" : 1, 24 | "author" : "xcode" 25 | } 26 | } -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIcons 10 | 11 | CFBundleIcons~ipad 12 | 13 | CFBundleIdentifier 14 | com.jigarm.tableview 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1 27 | LSRequiresIPhoneOS 28 | 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSample/myTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // myTableViewController.swift 3 | // TableViewSample 4 | // 5 | // Created by Jigar M on 31/07/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class myTableViewController: UITableViewController { 12 | var myData:Array = []; 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | myData = ["Apple", "Banana", "Carrot", "Cherry", "Mango", "Melon", "Orange", "Pear", "Pineapple", "Pulms", "Peaches", "Strawberry"]; 17 | 18 | } 19 | 20 | // #pragma mark - Table view data source 21 | 22 | override func numberOfSectionsInTableView(tableView: UITableView?) -> Int { 23 | return 1 24 | } 25 | 26 | override func tableView(tableView: UITableView?, numberOfRowsInSection section: Int) -> Int { 27 | return myData.count 28 | } 29 | 30 | override func tableView(tableView: UITableView?, cellForRowAtIndexPath indexPath: NSIndexPath?) -> UITableViewCell? { 31 | //let cell = tableView?.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell 32 | 33 | let CellID : String = "Cell"; 34 | var cell:UITableViewCell = tableView?.dequeueReusableCellWithIdentifier(CellID) as UITableViewCell 35 | if let ip = indexPath { 36 | cell.textLabel.text = myData[ip.row] as String 37 | } 38 | 39 | return cell 40 | } 41 | 42 | override func tableView(tableView: UITableView!, didDeselectRowAtIndexPath indexPath: NSIndexPath!) { 43 | //println("You selected cell \(indexPath.row)!") 44 | } 45 | 46 | // Override to support conditional editing of the table view. 47 | override func tableView(tableView: UITableView?, canEditRowAtIndexPath indexPath: NSIndexPath?) -> Bool { 48 | return true 49 | } 50 | 51 | // Override to support editing the table view. 52 | override func tableView(tableView: UITableView?, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath?) { 53 | if editingStyle == .Delete { 54 | if let tv = tableView { 55 | myData.removeAtIndex(indexPath!.row) 56 | tv.deleteRowsAtIndexPaths([indexPath!], withRowAnimation: .Fade) 57 | } 58 | 59 | } else if editingStyle == .Insert { 60 | // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.jigarm.tableview 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /TableView Samples/Simple TableView/TableViewSampleTests/TableViewSampleTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewSampleTests.swift 3 | // TableViewSampleTests 4 | // 5 | // Created by Jigar M on 31/07/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class TableViewSampleTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /UICollectionView+Swift/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Jigar M 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /UICollectionView+Swift/README.md: -------------------------------------------------------------------------------- 1 | UICollectionView-Swift 2 | ====================== 3 | 4 | Sample Swift Project using UICollectionView + Swift 5 | 6 | Simple Tests of Swift Language (no Objective-C) 7 | ================================================== 8 | 9 | + Methods & Properties 10 | + Closure 11 | + UIControlEvents 12 | + Button Target 13 | + Dictionary and Arrays 14 | + UICollection View 15 | + customCell (UICollectionView Cell) 16 | + JSON string 17 | + Provide tag and Draw the Custom Cell 18 | 19 | App Previews 20 | ==================== 21 | 22 | # Hows Flow looks like ?: 23 | 24 |

25 |  photo CollectionView_zps59d7aedf.gif 26 |

27 | 28 | ToDo (Working on) 29 | ========== 30 | + Working on Remote images using AFNetworking 31 | + Edit/Delete Cell 32 | 33 | 34 | ## Edit/Delete Cell : 35 | 36 | ### Objectie C : 37 | 38 | ```objective-c 39 | for(AlbumCell *cell in self.collectionView.visibleCells) 40 | { 41 | NSIndexPath *indexPath = [self.collectionView indexPathForCell:cell]; 42 | if ([indexPath row] != (dataArray.count - 1)){ 43 | //[cell.closeButton setHidden:NO]; 44 | cell.nameLbl.text = "Jigar M" 45 | } 46 | } 47 | ``` 48 | ### Swift 49 | ```swift 50 | for item in self.collectionView!.visibleCells() as [AlbumCell] { 51 | var indexpath : NSIndexPath = self.collectionView!.indexPathForCell(item as AlbumCell)! 52 | var cell : AlbumCell = self.collectionView!.cellForItemAtIndexPath(indexpath) as AlbumCell 53 | 54 | // Get Label 55 | var lbl : UILabel = cell.viewWithTag(101) as UILabel 56 | lbl.text = "Jigar M" 57 | } 58 | ``` 59 | 60 | # Require 61 | OSX 10.9.3 and Xcode 6.x (beta for now) 62 | 63 | # Swift 64 | ======= 65 | 66 | This project will highlight a few of the core language features about Swift, but I would read through these documents, I found them useful to learn more about Swift and understanding teh structure and syntax of the language: 67 | 68 | * [__Apple Documentation__](https://developer.apple.com/library/prerelease/ios/documentation/swift/conceptual/swift_programming_language/index.html) 69 | * [__Download the iBook__](https://itunes.apple.com/us/book/the-swift-programming-language/id881256329?mt=11) 70 | * [__Swift Cheat Sheet__](https://github.com/grant/swift-cheat-sheet) 71 | * [__Swift Language Highlights by Matt Galloway__](http://www.raywenderlich.com/73997/swift-language-highlights) 72 | 73 | 74 | # Development 75 | 76 | * [Jigar Maheshwari](http://twitter.com/jigar0809) 77 | 78 | # License 79 | 80 | The MIT License (MIT) 81 | 82 | Copyright (c) 2014 Jigar M 83 | 84 | Permission is hereby granted, free of charge, to any person obtaining a copy 85 | of this software and associated documentation files (the "Software"), to deal 86 | in the Software without restriction, including without limitation the rights 87 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 88 | copies of the Software, and to permit persons to whom the Software is 89 | furnished to do so, subject to the following conditions: 90 | 91 | The above copyright notice and this permission notice shall be included in all 92 | copies or substantial portions of the Software. 93 | 94 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 95 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 96 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 97 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 98 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 99 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 100 | SOFTWARE. 101 | 102 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift.xcodeproj/project.xcworkspace/xcshareddata/UICollectionView+Swift.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | C14F890D-E4B6-4B55-8578-8A9516D53DDA 9 | IDESourceControlProjectName 10 | UICollectionView+Swift 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 812EDC1B8485096F830DE672AD8EE61920C42A8A 14 | https://github.com/JigarM/Swift-Tutorials.git 15 | A75C365B94D8A323F9E2928B517E8442A83B6338 16 | https://github.com/JigarM/UICollectionView-Swift.git 17 | 18 | IDESourceControlProjectPath 19 | UICollectionView+Swift/UICollectionView+Swift.xcodeproj 20 | IDESourceControlProjectRelativeInstallPathDictionary 21 | 22 | 812EDC1B8485096F830DE672AD8EE61920C42A8A 23 | ../../.. 24 | A75C365B94D8A323F9E2928B517E8442A83B6338 25 | ../../../../UICollectionView-Swift 26 | 27 | IDESourceControlProjectURL 28 | https://github.com/JigarM/Swift-Tutorials.git 29 | IDESourceControlProjectVersion 30 | 111 31 | IDESourceControlProjectWCCIdentifier 32 | 812EDC1B8485096F830DE672AD8EE61920C42A8A 33 | IDESourceControlProjectWCConfigurations 34 | 35 | 36 | IDESourceControlRepositoryExtensionIdentifierKey 37 | public.vcs.git 38 | IDESourceControlWCCIdentifierKey 39 | 812EDC1B8485096F830DE672AD8EE61920C42A8A 40 | IDESourceControlWCCName 41 | Swift-Tutorials 42 | 43 | 44 | IDESourceControlRepositoryExtensionIdentifierKey 45 | public.vcs.git 46 | IDESourceControlWCCIdentifierKey 47 | A75C365B94D8A323F9E2928B517E8442A83B6338 48 | IDESourceControlWCCName 49 | UICollectionView-Swift 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift.xcodeproj/project.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift.xcodeproj/project.xcworkspace/xcuserdata/MM.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift.xcodeproj/xcuserdata/MM.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/UICollectionView+Swift.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift.xcodeproj/xcuserdata/MM.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UICollectionView+Swift.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8D6B00F0199C9FF800016722 16 | 17 | primary 18 | 19 | 20 | 8D6B0102199C9FF900016722 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/AlbumCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AlbumCell.swift 3 | // UICollectionView+Swift 4 | // 5 | // Created by Mobmaxime on 14/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class AlbumCell: UICollectionViewCell { 12 | @IBOutlet var AlbumImage : UIImageView? 13 | @IBOutlet var CloseImage : UIButton? 14 | 15 | } 16 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // UICollectionView+Swift 4 | // 5 | // Created by Mobmaxime on 14/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/a.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/b.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/c.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/close@2x.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/d.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/e.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/f.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/g.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/h.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/j.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/j.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/k.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/k.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/l.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/m.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/n.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/o.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/p.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/photo-frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/photo-frame.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/q.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/r.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Avatar/s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Avatar/s.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/AppIcon.appiconset/120 x 120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/AppIcon.appiconset/120 x 120.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/AppIcon.appiconset/58 x 58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/AppIcon.appiconset/58 x 58.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/AppIcon.appiconset/80 x 80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/AppIcon.appiconset/80 x 80.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "58 x 58.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "40x40", 11 | "idiom" : "iphone", 12 | "filename" : "80 x 80.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "60x60", 17 | "idiom" : "iphone", 18 | "filename" : "120 x 120.png", 19 | "scale" : "2x" 20 | } 21 | ], 22 | "info" : { 23 | "version" : 1, 24 | "author" : "xcode" 25 | } 26 | } -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "filename" : "Default@2x .png", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "extent" : "full-screen", 13 | "idiom" : "iphone", 14 | "subtype" : "retina4", 15 | "filename" : "Default-568h@2x.png", 16 | "minimum-system-version" : "7.0", 17 | "orientation" : "portrait", 18 | "scale" : "2x" 19 | } 20 | ], 21 | "info" : { 22 | "version" : 1, 23 | "author" : "xcode" 24 | } 25 | } -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/LaunchImage.launchimage/Default@2x .png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/Images.xcassets/LaunchImage.launchimage/Default@2x .png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.jigarm.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | Profile Album 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/ProfileController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ProfileController.swift 3 | // UICollectionView+Swift 4 | // 5 | // Created by Mobmaxime on 15/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import QuartzCore 11 | 12 | class ProfileController: UIViewController { 13 | 14 | @IBOutlet var BannerImage : UIImageView! 15 | @IBOutlet var ProfileImage : UIImageView! 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | 20 | //1. Circule profile picture 21 | //var layer : CALayer = self.ProfileImage?.layer 22 | self.ProfileImage.layer.cornerRadius = self.ProfileImage.frame.size.width / 2 23 | self.ProfileImage.layer.borderWidth = 3.5 24 | self.ProfileImage.layer.borderColor = UIColor.whiteColor().CGColor 25 | self.ProfileImage.clipsToBounds = true 26 | 27 | 28 | 29 | //2. Rectangle Profile shape 30 | /* 31 | var layer:CALayer = self.ProfileImage.layer! 32 | layer.shadowPath = UIBezierPath(rect: layer.bounds).CGPath 33 | layer.shouldRasterize = true; 34 | layer.rasterizationScale = UIScreen.mainScreen().scale 35 | layer.borderColor = UIColor.whiteColor().CGColor 36 | layer.borderWidth = 2.0 37 | layer.shadowColor = UIColor.grayColor().CGColor 38 | layer.shadowOpacity = 0.4 39 | layer.shadowOffset = CGSizeMake(1, 3) 40 | layer.shadowRadius = 1.5 41 | self.ProfileImage.clipsToBounds = false 42 | */ 43 | 44 | // Do any additional setup after loading the view. 45 | } 46 | 47 | 48 | /* 49 | // #pragma mark - Navigation 50 | 51 | // In a storyboard-based application, you will often want to do a little preparation before navigation 52 | override func prepareForSegue(segue: UIStoryboardSegue?, sender: AnyObject?) { 53 | // Get the new view controller using [segue destinationViewController]. 54 | // Pass the selected object to the new view controller. 55 | } 56 | */ 57 | 58 | } 59 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/UTILITY.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UTILITY.swift 3 | // UICollectionView+Swift 4 | // 5 | // Created by Mobmaxime on 15/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class UTILITY: NSObject { 12 | 13 | class func getRandomNumberBetween (From: Int , To: Int) -> Int { 14 | return From + Int(arc4random_uniform(UInt32(To - From + 1))) 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/banner1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/banner1.jpg -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/banner2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/banner2.jpg -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/banner3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/banner3.jpg -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/banner4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/banner4.jpg -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+Swift/i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JigarM/Swift-Tutorials/3479969427f8fc10fca690e4f1518557e1fe20d3/UICollectionView+Swift/UICollectionView+Swift/i.png -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+SwiftTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.jigarm.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /UICollectionView+Swift/UICollectionView+SwiftTests/UICollectionView_SwiftTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionView_SwiftTests.swift 3 | // UICollectionView+SwiftTests 4 | // 5 | // Created by Mobmaxime on 14/08/14. 6 | // Copyright (c) 2014 Jigar M. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class UICollectionView_SwiftTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | XCTAssert(true, "Pass") 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measureBlock() { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | --------------------------------------------------------------------------------