Skip to content

Commit

Permalink
Updating all example codes for Xcode 6.3 Beta 1 (6D520o)
Browse files Browse the repository at this point in the history
  • Loading branch information
vandadnp committed Feb 10, 2015
1 parent 8cecdd1 commit eed098f
Show file tree
Hide file tree
Showing 131 changed files with 234 additions and 234 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

}

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

switch ABAddressBookGetAuthorizationStatus(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

}

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

switch ABAddressBookGetAuthorizationStatus(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

switch ABAddressBookGetAuthorizationStatus(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

}

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[NSObject : AnyObject]?) -> Bool {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
&error).takeRetainedValue() as ABAddressBookRef
}()

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

switch ABAddressBookGetAuthorizationStatus(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// &error).takeRetainedValue() as ABAddressBookRef
// }()
//
// func application(application: UIApplication!,
// func application(application: UIApplication,
// didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
//
// switch ABAddressBookGetAuthorizationStatus(){
Expand Down Expand Up @@ -110,7 +110,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
&error).takeRetainedValue() as ABAddressBookRef
}()

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

switch ABAddressBookGetAuthorizationStatus(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

}

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

switch ABAddressBookGetAuthorizationStatus(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

}

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

switch ABAddressBookGetAuthorizationStatus(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// person.firstName = to
// }
//
// func application(application: UIApplication!,
// func application(application: UIApplication,
// didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
//
// var vandad = Person(firstName: "Vandad", lastName: "Nahavandipoor")
Expand All @@ -253,7 +253,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// }
//
//}

//
//@UIApplicationMain
//class AppDelegate: UIResponder, UIApplicationDelegate {
//
Expand All @@ -264,7 +264,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// /* person.firstName is VANDAD now and only in this function */
// }
//
// func application(application: UIApplication!,
// func application(application: UIApplication,
// didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
//
// var vandad = Person(firstName: "Vandad", lastName: "Nahavandipoor")
Expand All @@ -281,7 +281,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
//
// var window: UIWindow?
//
// func application(application: UIApplication!,
// func application(application: UIApplication,
// didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
//
// let integerValue = 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class PopoverTableViewController: UITableViewController {
cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

let cell = tableView.dequeueReusableCellWithIdentifier(
TableViewValues.identifier, forIndexPath: indexPath) as UITableViewCell
TableViewValues.identifier, forIndexPath: indexPath) as! UITableViewCell

cell.textLabel!.text = items[indexPath]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
//
// }
//
// func application(application: UIApplication!,
// func application(application: UIApplication,
// didFinishLaunchingWithOptions launchOptions:
// [NSObject : AnyObject]?) -> Bool {
//
Expand Down Expand Up @@ -152,7 +152,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

}

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[NSObject : AnyObject]?) -> Bool {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!,
didReceiveRemoteNotification userInfo: [NSObject : AnyObject]!) {
func application(application: UIApplication,
didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) {

println("A new record is generated and we received a push")

Expand All @@ -42,20 +42,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
object: nil)
}

func application(application: UIApplication!,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData!) {
func application(application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {

println("Successfully registered for remote notifications")
goAheadWithSubscriptionCreation()

}

func application(application: UIApplication!,
didFailToRegisterForRemoteNotificationsWithError error: NSError!){
func application(application: UIApplication,
didFailToRegisterForRemoteNotificationsWithError error: NSError){
println("Failed to receive remote notifications")
}

func application(application: UIApplication!,
func application(application: UIApplication,
didRegisterUserNotificationSettings
notificationSettings: UIUserNotificationSettings!) {

Expand All @@ -73,7 +73,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

var needToRequestSettingChanges = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class ViewController: UIViewController {
let smallestYearToLookFor = 2013

let predicate = NSPredicate(format: "maker = %@ AND year >= %@",
makerToLookFor, smallestYearToLookFor as NSNumber)
makerToLookFor, NSNumber(integer: smallestYearToLookFor))

let query = CKQuery(recordType: "MyCar", predicate: predicate)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ViewController: UIViewController {
}

if let name = recordName{
if countElements(name) == 0{
if count(name) == 0{
createNewRecordName()
} else {
println("The previously generated record ID was recovered")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,16 @@ class ViewController: UIViewController {
metadataQuery.disableUpdates()
metadataQuery.stopQuery()

for item in metadataQuery.results as [NSMetadataItem]{
for item in metadataQuery.results as! [NSMetadataItem]{

let itemName = item.valueForAttribute(NSMetadataItemFSNameKey)
as String
as! String

let itemUrl = item.valueForAttribute(NSMetadataItemURLKey)
as NSURL
as! NSURL

let itemSize = item.valueForAttribute(NSMetadataItemFSSizeKey)
as Int
as! Int

println("Item name = \(itemName)")
println("Item url = \(itemUrl)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class ViewController: UIViewController {
var foundEstateZone = false
var foundHatchbackZone = false

for zone in zones as [CKRecordZone]{
for zone in zones as! [CKRecordZone]{

if zone.zoneID.zoneName == CarType.Hatchback.rawValue{
foundHatchbackZone = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}

func application(application: UIApplication!,
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

if isIcloudAvailable() == false{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ViewController: UITableViewController {
cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

let cell = tableView.dequeueReusableCellWithIdentifier("Cell",
forIndexPath: indexPath) as UITableViewCell
forIndexPath: indexPath) as! UITableViewCell

cell.textLabel!.text = newsItems[indexPath.row].text

Expand Down
Loading

0 comments on commit eed098f

Please sign in to comment.