Skip to content

Commit 03951bc

Browse files
committed
Complete post creation, fix display on ipads, attempt fix for force touch
1 parent b1741fe commit 03951bc

14 files changed

+786
-96
lines changed

Podfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ target 'beefboard' do
99
pod 'ImageSlideshow/Kingfisher'
1010
pod 'Kingfisher', '~> 4.0'
1111
pod 'AwaitKit', '~> 5.0.1'
12+
pod 'JGProgressHUD'
13+
pod 'OpalImagePicker'
14+
pod 'BSImagePicker', '~> 2.8'
1215
end
1316

Podfile.lock

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@ PODS:
22
- Alamofire (4.7.3)
33
- AwaitKit (5.0.1):
44
- PromiseKit (~> 6)
5+
- BSGridCollectionViewLayout (1.2.2)
6+
- BSImagePicker (2.9.0):
7+
- BSGridCollectionViewLayout (= 1.2.2)
8+
- BSImageView (= 1.0.2)
9+
- BSImageView (1.0.2)
510
- ImageSlideshow (1.7.0):
611
- ImageSlideshow/Core (= 1.7.0)
712
- ImageSlideshow/Core (1.7.0)
813
- ImageSlideshow/Kingfisher (1.7.0):
914
- ImageSlideshow/Core
1015
- Kingfisher (> 3.0)
16+
- JGProgressHUD (2.0.3)
1117
- Kingfisher (4.10.0)
18+
- OpalImagePicker (2.0.0)
1219
- PromiseKit (6.5.2):
1320
- PromiseKit/CorePromise (= 6.5.2)
1421
- PromiseKit/Foundation (= 6.5.2)
@@ -22,25 +29,38 @@ PODS:
2229
DEPENDENCIES:
2330
- Alamofire (~> 4.7)
2431
- AwaitKit (~> 5.0.1)
32+
- BSImagePicker (~> 2.8)
2533
- ImageSlideshow (~> 1.6)
2634
- ImageSlideshow/Kingfisher
35+
- JGProgressHUD
2736
- Kingfisher (~> 4.0)
37+
- OpalImagePicker
2838

2939
SPEC REPOS:
3040
https://github.com/cocoapods/specs.git:
3141
- Alamofire
3242
- AwaitKit
43+
- BSGridCollectionViewLayout
44+
- BSImagePicker
45+
- BSImageView
3346
- ImageSlideshow
47+
- JGProgressHUD
3448
- Kingfisher
49+
- OpalImagePicker
3550
- PromiseKit
3651

3752
SPEC CHECKSUMS:
3853
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
3954
AwaitKit: a6d0b0b6d603cedda8ef1c1c249b8d6730359917
55+
BSGridCollectionViewLayout: 3e6f23b3a2b4f0ca9afae09ca01389d1057f7b32
56+
BSImagePicker: 553707de1adaad42eac252e0b84d20dbdba83fe9
57+
BSImageView: ab22ff8cae61f1ae17a3c9efeeb216af3cf84a09
4058
ImageSlideshow: f8eec5e37a980f60923b585ff23b0e140fd24018
59+
JGProgressHUD: 12b20a8f4ffe05258f8635c1ab92816e451f904d
4160
Kingfisher: 43c4b802d8b5256cf1f4379e9cd10b329be6d3e2
61+
OpalImagePicker: efc91612ef5b3849314801f68fddc26200da9435
4262
PromiseKit: 27c1601bfb73405871b805bcb8cf7e55c4dad3db
4363

44-
PODFILE CHECKSUM: ac7d8b323023837d8eac2a66c40c5a730be21761
64+
PODFILE CHECKSUM: 591cfb2c22aa3119059484dadb4037ce28e236d3
4565

4666
COCOAPODS: 1.5.3

beefboard.xcodeproj/project.pbxproj

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
4003E1DC2189B0500057DBB0 /* Api.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4003E1DB2189B0500057DBB0 /* Api.swift */; };
1111
400BF3B1218BD3DC004E2101 /* PostsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 400BF3B0218BD3DC004E2101 /* PostsController.swift */; };
1212
400BF3B3218BD417004E2101 /* PostDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 400BF3B2218BD417004E2101 /* PostDetailsController.swift */; };
13+
4042155421C31253005093DA /* SplitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4042155321C31253005093DA /* SplitViewController.swift */; };
1314
404AFD9921A9D09D0042BEC1 /* NewPostController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 404AFD9821A9D09D0042BEC1 /* NewPostController.swift */; };
1415
404AFD9B21AB27210042BEC1 /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 404AFD9A21AB27210042BEC1 /* Theme.swift */; };
1516
404AFD9D21AB2F840042BEC1 /* RegistrationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 404AFD9C21AB2F840042BEC1 /* RegistrationController.swift */; };
@@ -53,6 +54,7 @@
5354
4003E1DB2189B0500057DBB0 /* Api.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Api.swift; sourceTree = "<group>"; };
5455
400BF3B0218BD3DC004E2101 /* PostsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostsController.swift; sourceTree = "<group>"; };
5556
400BF3B2218BD417004E2101 /* PostDetailsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostDetailsController.swift; sourceTree = "<group>"; };
57+
4042155321C31253005093DA /* SplitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplitViewController.swift; sourceTree = "<group>"; };
5658
404AFD9821A9D09D0042BEC1 /* NewPostController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewPostController.swift; sourceTree = "<group>"; };
5759
404AFD9A21AB27210042BEC1 /* Theme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = "<group>"; };
5860
404AFD9C21AB2F840042BEC1 /* RegistrationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationController.swift; sourceTree = "<group>"; };
@@ -142,6 +144,7 @@
142144
isa = PBXGroup;
143145
children = (
144146
404AFDE821AD5CEA0042BEC1 /* PostCell.swift */,
147+
4042155321C31253005093DA /* SplitViewController.swift */,
145148
);
146149
path = Views;
147150
sourceTree = "<group>";
@@ -364,8 +367,13 @@
364367
"${SRCROOT}/Pods/Target Support Files/Pods-beefboard/Pods-beefboard-frameworks.sh",
365368
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
366369
"${BUILT_PRODUCTS_DIR}/AwaitKit/AwaitKit.framework",
370+
"${BUILT_PRODUCTS_DIR}/BSGridCollectionViewLayout/BSGridCollectionViewLayout.framework",
371+
"${BUILT_PRODUCTS_DIR}/BSImagePicker/BSImagePicker.framework",
372+
"${BUILT_PRODUCTS_DIR}/BSImageView/BSImageView.framework",
367373
"${BUILT_PRODUCTS_DIR}/ImageSlideshow/ImageSlideshow.framework",
374+
"${BUILT_PRODUCTS_DIR}/JGProgressHUD/JGProgressHUD.framework",
368375
"${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework",
376+
"${BUILT_PRODUCTS_DIR}/OpalImagePicker/OpalImagePicker.framework",
369377
"${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework",
370378
);
371379
name = "[CP] Embed Pods Frameworks";
@@ -374,8 +382,13 @@
374382
outputPaths = (
375383
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
376384
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AwaitKit.framework",
385+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BSGridCollectionViewLayout.framework",
386+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BSImagePicker.framework",
387+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BSImageView.framework",
377388
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ImageSlideshow.framework",
389+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JGProgressHUD.framework",
378390
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework",
391+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpalImagePicker.framework",
379392
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PromiseKit.framework",
380393
);
381394
runOnlyForDeploymentPostprocessing = 0;
@@ -417,6 +430,7 @@
417430
404AFD9B21AB27210042BEC1 /* Theme.swift in Sources */,
418431
400BF3B3218BD417004E2101 /* PostDetailsController.swift in Sources */,
419432
400BF3B1218BD3DC004E2101 /* PostsController.swift in Sources */,
433+
4042155421C31253005093DA /* SplitViewController.swift in Sources */,
420434
404AFDA321AB79080042BEC1 /* PostsDataModel.swift in Sources */,
421435
40BB43B72176042C00B8850C /* LoginController.swift in Sources */,
422436
404AFDE721AD57B80042BEC1 /* AuthModel.swift in Sources */,
@@ -616,7 +630,7 @@
616630
PRODUCT_BUNDLE_IDENTIFIER = uk.ac.coventry.bello.beefboard;
617631
PRODUCT_NAME = "$(TARGET_NAME)";
618632
SWIFT_VERSION = 4.2;
619-
TARGETED_DEVICE_FAMILY = 2;
633+
TARGETED_DEVICE_FAMILY = "1,2";
620634
};
621635
name = Debug;
622636
};
@@ -639,7 +653,7 @@
639653
PRODUCT_BUNDLE_IDENTIFIER = uk.ac.coventry.bello.beefboard;
640654
PRODUCT_NAME = "$(TARGET_NAME)";
641655
SWIFT_VERSION = 4.2;
642-
TARGETED_DEVICE_FAMILY = 2;
656+
TARGETED_DEVICE_FAMILY = "1,2";
643657
};
644658
name = Release;
645659
};

beefboard/AppDelegate.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,27 @@ import UIKit
1010
import CoreData
1111

1212
@UIApplicationMain
13-
class AppDelegate: UIResponder, UIApplicationDelegate {
13+
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate {
1414

1515
var window: UIWindow?
1616

1717

1818
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1919
//Theme.defaultTheme()
20+
21+
let splitViewController = self.window!.rootViewController as! UISplitViewController
22+
splitViewController.delegate = self
23+
24+
// Fix UI on ipads in portrait
25+
splitViewController.preferredDisplayMode = .allVisible
26+
2027
return true
2128
}
29+
30+
/* Ensure that the split view controller starts open */
31+
func splitViewController(_ svc: UISplitViewController, collapseSecondary secondaryViewController: UIViewController, onto primaryViewController: UIViewController) -> Bool{
32+
return false;
33+
}
2234

2335
func applicationWillResignActive(_ application: UIApplication) {
2436
// 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.

0 commit comments

Comments
 (0)