mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-23 03:36:34 +10:00
Faster pick image and Debug optimization
This commit is contained in:
@@ -1914,9 +1914,9 @@
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_OPTIMIZATION_LEVEL = 3;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"DEBUG=0",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
@@ -1984,7 +1984,7 @@
|
||||
"$(PROJECT_DIR)/build/Debug-iphoneos/Pods",
|
||||
"$(PROJECT_DIR)",
|
||||
);
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_OPTIMIZATION_LEVEL = 3;
|
||||
INFOPLIST_FILE = Yep/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
@@ -2011,7 +2011,7 @@
|
||||
"$(PROJECT_DIR)/build/Debug-iphoneos/Pods",
|
||||
"$(PROJECT_DIR)",
|
||||
);
|
||||
GCC_OPTIMIZATION_LEVEL = 3;
|
||||
GCC_OPTIMIZATION_LEVEL = s;
|
||||
INFOPLIST_FILE = Yep/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
||||
@@ -404,6 +404,8 @@ func sendVerifyCodeOfMobile(mobile: String, withAreaCode areaCode: String, useMe
|
||||
|
||||
func loginByMobile(mobile: String, withAreaCode areaCode: String, #verifyCode: String, #failureHandler: ((Reason, String?) -> Void)?, #completion: LoginUser -> Void) {
|
||||
|
||||
println("User login type is \(YepConfig.clientType())")
|
||||
|
||||
let requestParameters: JSONDictionary = [
|
||||
"mobile": mobile,
|
||||
"phone_code": areaCode,
|
||||
|
||||
@@ -136,6 +136,8 @@ class ConversationViewController: BaseViewController {
|
||||
}()
|
||||
|
||||
let messageImagePreferredAspectRatio: CGFloat = 4.0 / 3.0
|
||||
|
||||
let imagePicker = UIImagePickerController()
|
||||
|
||||
let chatSectionDateCellIdentifier = "ChatSectionDateCell"
|
||||
let chatStateCellIdentifier = "ChatStateCell"
|
||||
@@ -560,14 +562,15 @@ class ConversationViewController: BaseViewController {
|
||||
|
||||
let openCameraRoll: ProposerAction = { [weak self] in
|
||||
if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.PhotoLibrary){
|
||||
let imagePicker = UIImagePickerController()
|
||||
imagePicker.delegate = self
|
||||
imagePicker.sourceType = .PhotoLibrary
|
||||
imagePicker.mediaTypes = [kUTTypeImage, kUTTypeMovie]
|
||||
imagePicker.videoQuality = .TypeMedium
|
||||
imagePicker.allowsEditing = false
|
||||
|
||||
self?.presentViewController(imagePicker, animated: true, completion: nil)
|
||||
if let weakSelf = self {
|
||||
weakSelf.imagePicker.delegate = weakSelf
|
||||
weakSelf.imagePicker.sourceType = .PhotoLibrary
|
||||
weakSelf.imagePicker.mediaTypes = [kUTTypeImage, kUTTypeMovie]
|
||||
weakSelf.imagePicker.videoQuality = .TypeMedium
|
||||
weakSelf.imagePicker.allowsEditing = false
|
||||
|
||||
weakSelf.presentViewController(weakSelf.imagePicker, animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,14 +584,15 @@ class ConversationViewController: BaseViewController {
|
||||
|
||||
let openCamera: ProposerAction = { [weak self] in
|
||||
if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera) {
|
||||
let imagePicker = UIImagePickerController()
|
||||
imagePicker.delegate = self
|
||||
imagePicker.sourceType = .Camera
|
||||
imagePicker.mediaTypes = [kUTTypeImage, kUTTypeMovie]
|
||||
imagePicker.videoQuality = .TypeMedium
|
||||
imagePicker.allowsEditing = false
|
||||
if let weakSelf = self {
|
||||
weakSelf.imagePicker.delegate = weakSelf
|
||||
weakSelf.imagePicker.sourceType = .Camera
|
||||
weakSelf.imagePicker.mediaTypes = [kUTTypeImage, kUTTypeMovie]
|
||||
weakSelf.imagePicker.videoQuality = .TypeMedium
|
||||
weakSelf.imagePicker.allowsEditing = false
|
||||
|
||||
self?.presentViewController(imagePicker, animated: true, completion: nil)
|
||||
weakSelf.presentViewController(weakSelf.imagePicker, animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user