From b171ec1ffec74490b1cad8407027cfd1fa48314f Mon Sep 17 00:00:00 2001 From: Miles Crabill Date: Tue, 9 Dec 2014 20:22:25 +0100 Subject: [PATCH] added main storyboard for ui merge --- Main.storyboard | 7 +++++++ socialCalendar.xcodeproj/project.pbxproj | 4 ++++ socialCalendar/Base.lproj/Kevin.storyboard | 4 ++-- socialCalendar/Base.lproj/Miles.storyboard | 6 +++--- socialCalendar/FriendsTableViewController.swift | 11 ++++------- socialCalendar/Info.plist | 2 +- 6 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 Main.storyboard diff --git a/Main.storyboard b/Main.storyboard new file mode 100644 index 0000000..a1447b9 --- /dev/null +++ b/Main.storyboard @@ -0,0 +1,7 @@ + + + + + + + diff --git a/socialCalendar.xcodeproj/project.pbxproj b/socialCalendar.xcodeproj/project.pbxproj index 8684e0b..4d905ea 100644 --- a/socialCalendar.xcodeproj/project.pbxproj +++ b/socialCalendar.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 025122511A3782CB00F3900A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 025122501A3782CB00F3900A /* Main.storyboard */; }; 02C91E741A2E08E100B3977B /* Accounts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02C91E731A2E08E100B3977B /* Accounts.framework */; }; 02C91E761A2E08E500B3977B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02C91E751A2E08E500B3977B /* AudioToolbox.framework */; }; 02C91E781A2E08ED00B3977B /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02C91E771A2E08EC00B3977B /* CFNetwork.framework */; }; @@ -52,6 +53,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 025122501A3782CB00F3900A /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = ../Main.storyboard; sourceTree = ""; }; 02C91E731A2E08E100B3977B /* Accounts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accounts.framework; path = System/Library/Frameworks/Accounts.framework; sourceTree = SDKROOT; }; 02C91E751A2E08E500B3977B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 02C91E771A2E08EC00B3977B /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; @@ -171,6 +173,7 @@ 1079FEF01A2D4AD900654080 /* socialCalendar */ = { isa = PBXGroup; children = ( + 025122501A3782CB00F3900A /* Main.storyboard */, 1036795E1A2E3124001D63D2 /* friends.xcdatamodeld */, 02F9119A1A2E61EE00B15744 /* Kevin.storyboard */, 02F911971A2E604C00B15744 /* Miles.storyboard */, @@ -304,6 +307,7 @@ buildActionMask = 2147483647; files = ( 02F9119C1A2E61EE00B15744 /* Kevin.storyboard in Resources */, + 025122511A3782CB00F3900A /* Main.storyboard in Resources */, 02F911991A2E604C00B15744 /* Miles.storyboard in Resources */, 1079FEFE1A2D4AD900654080 /* LaunchScreen.xib in Resources */, 1079FEFB1A2D4AD900654080 /* Images.xcassets in Resources */, diff --git a/socialCalendar/Base.lproj/Kevin.storyboard b/socialCalendar/Base.lproj/Kevin.storyboard index 0bece84..3edb83e 100644 --- a/socialCalendar/Base.lproj/Kevin.storyboard +++ b/socialCalendar/Base.lproj/Kevin.storyboard @@ -1,7 +1,7 @@ - + - + diff --git a/socialCalendar/Base.lproj/Miles.storyboard b/socialCalendar/Base.lproj/Miles.storyboard index 13dee81..92e98ee 100644 --- a/socialCalendar/Base.lproj/Miles.storyboard +++ b/socialCalendar/Base.lproj/Miles.storyboard @@ -1,7 +1,7 @@ - + - + @@ -18,7 +18,7 @@ - + diff --git a/socialCalendar/FriendsTableViewController.swift b/socialCalendar/FriendsTableViewController.swift index 70017d9..a06534e 100644 --- a/socialCalendar/FriendsTableViewController.swift +++ b/socialCalendar/FriendsTableViewController.swift @@ -101,8 +101,6 @@ class FriendsTableViewController: UITableViewController, UISearchBarDelegate, UI let managedObjectContext = AppDelegate.sharedAppDelegate.managedObjectContext! managedObjectContext.deleteObject(sortedFriends[indexPath.row]) sortedFriends.removeAtIndex(indexPath.row) - - friendManager.friends.removeAtIndex(indexPath.row) AppDelegate.sharedAppDelegate.saveContext() tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade) @@ -119,9 +117,9 @@ class FriendsTableViewController: UITableViewController, UISearchBarDelegate, UI // Override to support rearranging the table view. override func tableView(tableView: UITableView, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { - let friendToMove = friendManager.friends[fromIndexPath.row] - friendManager.friends.removeAtIndex(fromIndexPath.row) - friendManager.friends.insert(friendToMove, atIndex: toIndexPath.row) + let friendToMove = sortedFriends[fromIndexPath.row] + sortedFriends.removeAtIndex(fromIndexPath.row) + sortedFriends.insert(friendToMove, atIndex: toIndexPath.row) } @@ -153,8 +151,7 @@ class FriendsTableViewController: UITableViewController, UISearchBarDelegate, UI } } else { - - let friend = friendManager.friends[tableView.indexPathForSelectedRow()!.row] + let friend = sortedFriends[tableView.indexPathForSelectedRow()!.row] destinationViewController.friend = friend } } diff --git a/socialCalendar/Info.plist b/socialCalendar/Info.plist index 9589179..eccf8f8 100644 --- a/socialCalendar/Info.plist +++ b/socialCalendar/Info.plist @@ -25,7 +25,7 @@ UILaunchStoryboardName LaunchScreen UIMainStoryboardFile - Kevin + Main UIRequiredDeviceCapabilities armv7