xiongzhu 7 лет назад
Родитель
Сommit
ae2a3202d5
32 измененных файлов с 1311 добавлено и 922 удалено
  1. BIN
      .DS_Store
  2. 1 0
      Podfile
  3. 5 1
      Podfile.lock
  4. 1 0
      Pods/Headers/Private/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.h
  5. 1 0
      Pods/Headers/Public/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.h
  6. 5 1
      Pods/Manifest.lock
  7. 565 549
      Pods/Pods.xcodeproj/project.pbxproj
  8. 24 0
      Pods/Target Support Files/Pods-model/Pods-model-acknowledgements.markdown
  9. 30 0
      Pods/Target Support Files/Pods-model/Pods-model-acknowledgements.plist
  10. 4 4
      Pods/Target Support Files/Pods-model/Pods-model.debug.xcconfig
  11. 4 4
      Pods/Target Support Files/Pods-model/Pods-model.release.xcconfig
  12. 5 0
      Pods/Target Support Files/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout-dummy.m
  13. 12 0
      Pods/Target Support Files/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout-prefix.pch
  14. 9 0
      Pods/Target Support Files/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.xcconfig
  15. 20 0
      Pods/UICollectionViewLeftAlignedLayout/LICENSE
  16. 42 0
      Pods/UICollectionViewLeftAlignedLayout/README.md
  17. 40 0
      Pods/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.h
  18. 117 0
      Pods/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.m
  19. 1 1
      model.xcodeproj/project.pbxproj
  20. 51 70
      model/AppDelegate.m
  21. BIN
      model/Assets.xcassets/个人中心/.DS_Store
  22. 1 1
      model/Classes/Controllers/Controller/MessageVC/MessageListViewController.m
  23. 1 4
      model/Classes/Controllers/Controller/MyProfileVC/InfoEditViewController.m
  24. 39 42
      model/Classes/Controllers/Controller/MyProfileVC/ModelHonorViewController.m
  25. 159 115
      model/Classes/Controllers/Controller/MyProfileVC/ModelPhotoViewController.m
  26. 10 3
      model/Classes/Controllers/Controller/MySkillsVC/MySkillsController.m
  27. 1 2
      model/Classes/Controllers/Controller/PrivateVC/PrivateSpaceViewController.m
  28. 30 15
      model/Classes/Controllers/Controller/ShareVC/ShareViewController.m
  29. 1 0
      model/Classes/Controllers/Controller/ShareVC/ShareViewController.xib
  30. 2 0
      model/Classes/Controllers/Model/ModelUser.m
  31. 29 9
      model/Classes/Controllers/View/PhotoCollectionViewCell.xib
  32. 101 101
      model/Classes/Public/RegisterViewController.m

+ 1 - 0
Podfile

@@ -17,5 +17,6 @@ pod 'UMCPush'
 pod 'UMCSecurityPlugins'
 pod 'WechatOpenSDK'
 pod 'WZLBadge'
+pod 'UICollectionViewLeftAlignedLayout'
 end
 

+ 5 - 1
Podfile.lock

@@ -26,6 +26,7 @@ PODS:
   - SDWebImage/Core (4.3.3)
   - Toast (4.0.0)
   - TTGTagCollectionView (1.9.0)
+  - UICollectionViewLeftAlignedLayout (1.0.2)
   - UMCCommon (1.5.2)
   - UMCPush (3.2.3):
     - UMCCommon
@@ -45,6 +46,7 @@ DEPENDENCIES:
   - SDWebImage
   - Toast
   - TTGTagCollectionView
+  - UICollectionViewLeftAlignedLayout
   - UMCCommon
   - UMCPush
   - UMCSecurityPlugins
@@ -64,6 +66,7 @@ SPEC REPOS:
     - SDWebImage
     - Toast
     - TTGTagCollectionView
+    - UICollectionViewLeftAlignedLayout
     - UMCCommon
     - UMCPush
     - UMCSecurityPlugins
@@ -82,12 +85,13 @@ SPEC CHECKSUMS:
   SDWebImage: de4d90b5bff3571eae7bd16202b1f43135409fa5
   Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
   TTGTagCollectionView: 958f20b946dee92a8ba20dc37d10a06737641ae9
+  UICollectionViewLeftAlignedLayout: 830bf6fa5bab9f9b464f62e3384f9d2e00b3c0f6
   UMCCommon: 4392868ac47ff1b101663106bb114ba616fabbad
   UMCPush: 628b5c61be5a5036cb31eb9b3a3ab8dce7521691
   UMCSecurityPlugins: 0831a08f3988f3cea9f1d3a7626cd9bee4fef150
   WechatOpenSDK: 3117412f8aafde4758cac1e8d20b93c67cafcfef
   WZLBadge: 9ec779dcfd94c825518b395e8315fccaabff1bfa
 
-PODFILE CHECKSUM: a66e81dcd6973dfd7e7f7eb9e9938690aa0a2d7b
+PODFILE CHECKSUM: 6ebc3ae8070ce9785966a1870b1ac59dcf6107d9
 
 COCOAPODS: 1.5.3

+ 1 - 0
Pods/Headers/Private/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.h

@@ -0,0 +1 @@
+../../../UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.h

+ 1 - 0
Pods/Headers/Public/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.h

@@ -0,0 +1 @@
+../../../UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.h

+ 5 - 1
Pods/Manifest.lock

@@ -26,6 +26,7 @@ PODS:
   - SDWebImage/Core (4.3.3)
   - Toast (4.0.0)
   - TTGTagCollectionView (1.9.0)
+  - UICollectionViewLeftAlignedLayout (1.0.2)
   - UMCCommon (1.5.2)
   - UMCPush (3.2.3):
     - UMCCommon
@@ -45,6 +46,7 @@ DEPENDENCIES:
   - SDWebImage
   - Toast
   - TTGTagCollectionView
+  - UICollectionViewLeftAlignedLayout
   - UMCCommon
   - UMCPush
   - UMCSecurityPlugins
@@ -64,6 +66,7 @@ SPEC REPOS:
     - SDWebImage
     - Toast
     - TTGTagCollectionView
+    - UICollectionViewLeftAlignedLayout
     - UMCCommon
     - UMCPush
     - UMCSecurityPlugins
@@ -82,12 +85,13 @@ SPEC CHECKSUMS:
   SDWebImage: de4d90b5bff3571eae7bd16202b1f43135409fa5
   Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
   TTGTagCollectionView: 958f20b946dee92a8ba20dc37d10a06737641ae9
+  UICollectionViewLeftAlignedLayout: 830bf6fa5bab9f9b464f62e3384f9d2e00b3c0f6
   UMCCommon: 4392868ac47ff1b101663106bb114ba616fabbad
   UMCPush: 628b5c61be5a5036cb31eb9b3a3ab8dce7521691
   UMCSecurityPlugins: 0831a08f3988f3cea9f1d3a7626cd9bee4fef150
   WechatOpenSDK: 3117412f8aafde4758cac1e8d20b93c67cafcfef
   WZLBadge: 9ec779dcfd94c825518b395e8315fccaabff1bfa
 
-PODFILE CHECKSUM: a66e81dcd6973dfd7e7f7eb9e9938690aa0a2d7b
+PODFILE CHECKSUM: 6ebc3ae8070ce9785966a1870b1ac59dcf6107d9
 
 COCOAPODS: 1.5.3

Разница между файлами не показана из-за своего большого размера
+ 565 - 549
Pods/Pods.xcodeproj/project.pbxproj


+ 24 - 0
Pods/Target Support Files/Pods-model/Pods-model-acknowledgements.markdown

@@ -420,6 +420,30 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 
+## UICollectionViewLeftAlignedLayout
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Giovanni Lodi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
 ## UMCCommon
 
 Copyright 2011 - 2018 umeng.com. All rights reserved.

+ 30 - 0
Pods/Target Support Files/Pods-model/Pods-model-acknowledgements.plist

@@ -497,6 +497,36 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 			<key>Type</key>
 			<string>PSGroupSpecifier</string>
 		</dict>
+		<dict>
+			<key>FooterText</key>
+			<string>The MIT License (MIT)
+
+Copyright (c) 2014 Giovanni Lodi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+</string>
+			<key>License</key>
+			<string>MIT</string>
+			<key>Title</key>
+			<string>UICollectionViewLeftAlignedLayout</string>
+			<key>Type</key>
+			<string>PSGroupSpecifier</string>
+		</dict>
 		<dict>
 			<key>FooterText</key>
 			<string>Copyright 2011 - 2018 umeng.com. All rights reserved.

+ 4 - 4
Pods/Target Support Files/Pods-model/Pods-model.debug.xcconfig

@@ -1,9 +1,9 @@
 FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/NIMSDK/NIMSDK" "${PODS_ROOT}/NIMSDK/NIMAVChat" "${PODS_ROOT}/UMCCommon" "${PODS_ROOT}/UMCPush" "${PODS_ROOT}/UMCSecurityPlugins/thirdparties"
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/IQKeyboardManager" "${PODS_ROOT}/Headers/Public/M80AttributedLabel" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/NIMSDK" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTGTagCollectionView" "${PODS_ROOT}/Headers/Public/Toast" "${PODS_ROOT}/Headers/Public/UMCCommon" "${PODS_ROOT}/Headers/Public/UMCPush" "${PODS_ROOT}/Headers/Public/UMCSecurityPlugins" "${PODS_ROOT}/Headers/Public/WZLBadge" "${PODS_ROOT}/Headers/Public/WechatOpenSDK"
-LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/BRPickerView" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManager" "${PODS_CONFIGURATION_BUILD_DIR}/M80AttributedLabel" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/TTGTagCollectionView" "${PODS_CONFIGURATION_BUILD_DIR}/Toast" "${PODS_CONFIGURATION_BUILD_DIR}/WZLBadge" "${PODS_ROOT}/NIMSDK/NIMAVChat/Libs" "${PODS_ROOT}/NIMSDK/NIMSDK/Libs" "${PODS_ROOT}/WechatOpenSDK/WeChatSDK1.8.3"
-OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/BRPickerView" -isystem "${PODS_ROOT}/Headers/Public/IQKeyboardManager" -isystem "${PODS_ROOT}/Headers/Public/M80AttributedLabel" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/MJExtension" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/NIMSDK" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/TTGTagCollectionView" -isystem "${PODS_ROOT}/Headers/Public/Toast" -isystem "${PODS_ROOT}/Headers/Public/UMCCommon" -isystem "${PODS_ROOT}/Headers/Public/UMCPush" -isystem "${PODS_ROOT}/Headers/Public/UMCSecurityPlugins" -isystem "${PODS_ROOT}/Headers/Public/WZLBadge" -isystem "${PODS_ROOT}/Headers/Public/WechatOpenSDK"
-OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"BRPickerView" -l"GPUImage" -l"IQKeyboardManager" -l"M80AttributedLabel" -l"MBProgressHUD" -l"MJExtension" -l"MJRefresh" -l"NMCAudioModule" -l"NMCVideoModule" -l"SDWebImage" -l"TTGTagCollectionView" -l"Toast" -l"WZLBadge" -l"WeChatSDK" -l"aacplus" -l"c++" -l"crypto" -l"event" -l"nio" -l"nts" -l"nvs" -l"openh264" -l"opus" -l"sqlite3" -l"sqlite3.0" -l"ssl" -l"z" -framework "AVFoundation" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "MobileCoreServices" -framework "NIMAVChat" -framework "NIMSDK" -framework "QuartzCore" -framework "Security" -framework "SecurityEnvSDK" -framework "SystemConfiguration" -framework "UIKit" -framework "UMCommon" -framework "UMPush" -framework "UTDID" -framework "UserNotifications" -framework "VideoToolbox"
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/IQKeyboardManager" "${PODS_ROOT}/Headers/Public/M80AttributedLabel" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/NIMSDK" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTGTagCollectionView" "${PODS_ROOT}/Headers/Public/Toast" "${PODS_ROOT}/Headers/Public/UICollectionViewLeftAlignedLayout" "${PODS_ROOT}/Headers/Public/UMCCommon" "${PODS_ROOT}/Headers/Public/UMCPush" "${PODS_ROOT}/Headers/Public/UMCSecurityPlugins" "${PODS_ROOT}/Headers/Public/WZLBadge" "${PODS_ROOT}/Headers/Public/WechatOpenSDK"
+LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/BRPickerView" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManager" "${PODS_CONFIGURATION_BUILD_DIR}/M80AttributedLabel" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/TTGTagCollectionView" "${PODS_CONFIGURATION_BUILD_DIR}/Toast" "${PODS_CONFIGURATION_BUILD_DIR}/UICollectionViewLeftAlignedLayout" "${PODS_CONFIGURATION_BUILD_DIR}/WZLBadge" "${PODS_ROOT}/NIMSDK/NIMAVChat/Libs" "${PODS_ROOT}/NIMSDK/NIMSDK/Libs" "${PODS_ROOT}/WechatOpenSDK/WeChatSDK1.8.3"
+OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/BRPickerView" -isystem "${PODS_ROOT}/Headers/Public/IQKeyboardManager" -isystem "${PODS_ROOT}/Headers/Public/M80AttributedLabel" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/MJExtension" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/NIMSDK" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/TTGTagCollectionView" -isystem "${PODS_ROOT}/Headers/Public/Toast" -isystem "${PODS_ROOT}/Headers/Public/UICollectionViewLeftAlignedLayout" -isystem "${PODS_ROOT}/Headers/Public/UMCCommon" -isystem "${PODS_ROOT}/Headers/Public/UMCPush" -isystem "${PODS_ROOT}/Headers/Public/UMCSecurityPlugins" -isystem "${PODS_ROOT}/Headers/Public/WZLBadge" -isystem "${PODS_ROOT}/Headers/Public/WechatOpenSDK"
+OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"BRPickerView" -l"GPUImage" -l"IQKeyboardManager" -l"M80AttributedLabel" -l"MBProgressHUD" -l"MJExtension" -l"MJRefresh" -l"NMCAudioModule" -l"NMCVideoModule" -l"SDWebImage" -l"TTGTagCollectionView" -l"Toast" -l"UICollectionViewLeftAlignedLayout" -l"WZLBadge" -l"WeChatSDK" -l"aacplus" -l"c++" -l"crypto" -l"event" -l"nio" -l"nts" -l"nvs" -l"openh264" -l"opus" -l"sqlite3" -l"sqlite3.0" -l"ssl" -l"z" -framework "AVFoundation" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "MobileCoreServices" -framework "NIMAVChat" -framework "NIMSDK" -framework "QuartzCore" -framework "Security" -framework "SecurityEnvSDK" -framework "SystemConfiguration" -framework "UIKit" -framework "UMCommon" -framework "UMPush" -framework "UTDID" -framework "UserNotifications" -framework "VideoToolbox"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
 PODS_PODFILE_DIR_PATH = ${SRCROOT}/.

+ 4 - 4
Pods/Target Support Files/Pods-model/Pods-model.release.xcconfig

@@ -1,9 +1,9 @@
 FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/NIMSDK/NIMSDK" "${PODS_ROOT}/NIMSDK/NIMAVChat" "${PODS_ROOT}/UMCCommon" "${PODS_ROOT}/UMCPush" "${PODS_ROOT}/UMCSecurityPlugins/thirdparties"
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/IQKeyboardManager" "${PODS_ROOT}/Headers/Public/M80AttributedLabel" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/NIMSDK" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTGTagCollectionView" "${PODS_ROOT}/Headers/Public/Toast" "${PODS_ROOT}/Headers/Public/UMCCommon" "${PODS_ROOT}/Headers/Public/UMCPush" "${PODS_ROOT}/Headers/Public/UMCSecurityPlugins" "${PODS_ROOT}/Headers/Public/WZLBadge" "${PODS_ROOT}/Headers/Public/WechatOpenSDK"
-LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/BRPickerView" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManager" "${PODS_CONFIGURATION_BUILD_DIR}/M80AttributedLabel" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/TTGTagCollectionView" "${PODS_CONFIGURATION_BUILD_DIR}/Toast" "${PODS_CONFIGURATION_BUILD_DIR}/WZLBadge" "${PODS_ROOT}/NIMSDK/NIMAVChat/Libs" "${PODS_ROOT}/NIMSDK/NIMSDK/Libs" "${PODS_ROOT}/WechatOpenSDK/WeChatSDK1.8.3"
-OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/BRPickerView" -isystem "${PODS_ROOT}/Headers/Public/IQKeyboardManager" -isystem "${PODS_ROOT}/Headers/Public/M80AttributedLabel" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/MJExtension" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/NIMSDK" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/TTGTagCollectionView" -isystem "${PODS_ROOT}/Headers/Public/Toast" -isystem "${PODS_ROOT}/Headers/Public/UMCCommon" -isystem "${PODS_ROOT}/Headers/Public/UMCPush" -isystem "${PODS_ROOT}/Headers/Public/UMCSecurityPlugins" -isystem "${PODS_ROOT}/Headers/Public/WZLBadge" -isystem "${PODS_ROOT}/Headers/Public/WechatOpenSDK"
-OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"BRPickerView" -l"GPUImage" -l"IQKeyboardManager" -l"M80AttributedLabel" -l"MBProgressHUD" -l"MJExtension" -l"MJRefresh" -l"NMCAudioModule" -l"NMCVideoModule" -l"SDWebImage" -l"TTGTagCollectionView" -l"Toast" -l"WZLBadge" -l"WeChatSDK" -l"aacplus" -l"c++" -l"crypto" -l"event" -l"nio" -l"nts" -l"nvs" -l"openh264" -l"opus" -l"sqlite3" -l"sqlite3.0" -l"ssl" -l"z" -framework "AVFoundation" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "MobileCoreServices" -framework "NIMAVChat" -framework "NIMSDK" -framework "QuartzCore" -framework "Security" -framework "SecurityEnvSDK" -framework "SystemConfiguration" -framework "UIKit" -framework "UMCommon" -framework "UMPush" -framework "UTDID" -framework "UserNotifications" -framework "VideoToolbox"
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/BRPickerView" "${PODS_ROOT}/Headers/Public/IQKeyboardManager" "${PODS_ROOT}/Headers/Public/M80AttributedLabel" "${PODS_ROOT}/Headers/Public/MBProgressHUD" "${PODS_ROOT}/Headers/Public/MJExtension" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/NIMSDK" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTGTagCollectionView" "${PODS_ROOT}/Headers/Public/Toast" "${PODS_ROOT}/Headers/Public/UICollectionViewLeftAlignedLayout" "${PODS_ROOT}/Headers/Public/UMCCommon" "${PODS_ROOT}/Headers/Public/UMCPush" "${PODS_ROOT}/Headers/Public/UMCSecurityPlugins" "${PODS_ROOT}/Headers/Public/WZLBadge" "${PODS_ROOT}/Headers/Public/WechatOpenSDK"
+LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AFNetworking" "${PODS_CONFIGURATION_BUILD_DIR}/BRPickerView" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManager" "${PODS_CONFIGURATION_BUILD_DIR}/M80AttributedLabel" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/MJExtension" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/TTGTagCollectionView" "${PODS_CONFIGURATION_BUILD_DIR}/Toast" "${PODS_CONFIGURATION_BUILD_DIR}/UICollectionViewLeftAlignedLayout" "${PODS_CONFIGURATION_BUILD_DIR}/WZLBadge" "${PODS_ROOT}/NIMSDK/NIMAVChat/Libs" "${PODS_ROOT}/NIMSDK/NIMSDK/Libs" "${PODS_ROOT}/WechatOpenSDK/WeChatSDK1.8.3"
+OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/BRPickerView" -isystem "${PODS_ROOT}/Headers/Public/IQKeyboardManager" -isystem "${PODS_ROOT}/Headers/Public/M80AttributedLabel" -isystem "${PODS_ROOT}/Headers/Public/MBProgressHUD" -isystem "${PODS_ROOT}/Headers/Public/MJExtension" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/NIMSDK" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/TTGTagCollectionView" -isystem "${PODS_ROOT}/Headers/Public/Toast" -isystem "${PODS_ROOT}/Headers/Public/UICollectionViewLeftAlignedLayout" -isystem "${PODS_ROOT}/Headers/Public/UMCCommon" -isystem "${PODS_ROOT}/Headers/Public/UMCPush" -isystem "${PODS_ROOT}/Headers/Public/UMCSecurityPlugins" -isystem "${PODS_ROOT}/Headers/Public/WZLBadge" -isystem "${PODS_ROOT}/Headers/Public/WechatOpenSDK"
+OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"BRPickerView" -l"GPUImage" -l"IQKeyboardManager" -l"M80AttributedLabel" -l"MBProgressHUD" -l"MJExtension" -l"MJRefresh" -l"NMCAudioModule" -l"NMCVideoModule" -l"SDWebImage" -l"TTGTagCollectionView" -l"Toast" -l"UICollectionViewLeftAlignedLayout" -l"WZLBadge" -l"WeChatSDK" -l"aacplus" -l"c++" -l"crypto" -l"event" -l"nio" -l"nts" -l"nvs" -l"openh264" -l"opus" -l"sqlite3" -l"sqlite3.0" -l"ssl" -l"z" -framework "AVFoundation" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "MobileCoreServices" -framework "NIMAVChat" -framework "NIMSDK" -framework "QuartzCore" -framework "Security" -framework "SecurityEnvSDK" -framework "SystemConfiguration" -framework "UIKit" -framework "UMCommon" -framework "UMPush" -framework "UTDID" -framework "UserNotifications" -framework "VideoToolbox"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
 PODS_PODFILE_DIR_PATH = ${SRCROOT}/.

+ 5 - 0
Pods/Target Support Files/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout-dummy.m

@@ -0,0 +1,5 @@
+#import <Foundation/Foundation.h>
+@interface PodsDummy_UICollectionViewLeftAlignedLayout : NSObject
+@end
+@implementation PodsDummy_UICollectionViewLeftAlignedLayout
+@end

+ 12 - 0
Pods/Target Support Files/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout-prefix.pch

@@ -0,0 +1,12 @@
+#ifdef __OBJC__
+#import <UIKit/UIKit.h>
+#else
+#ifndef FOUNDATION_EXPORT
+#if defined(__cplusplus)
+#define FOUNDATION_EXPORT extern "C"
+#else
+#define FOUNDATION_EXPORT extern
+#endif
+#endif
+#endif
+

+ 9 - 0
Pods/Target Support Files/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.xcconfig

@@ -0,0 +1,9 @@
+CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/UICollectionViewLeftAlignedLayout
+GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/UICollectionViewLeftAlignedLayout" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/UICollectionViewLeftAlignedLayout"
+PODS_BUILD_DIR = ${BUILD_DIR}
+PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
+PODS_ROOT = ${SRCROOT}
+PODS_TARGET_SRCROOT = ${PODS_ROOT}/UICollectionViewLeftAlignedLayout
+PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
+SKIP_INSTALL = YES

+ 20 - 0
Pods/UICollectionViewLeftAlignedLayout/LICENSE

@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Giovanni Lodi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 42 - 0
Pods/UICollectionViewLeftAlignedLayout/README.md

@@ -0,0 +1,42 @@
+UICollectionView Left Aligned Layout
+====================================
+
+A `UICollectionViewLayout` implementation that aligns the cells to the left. 
+
+<img src="https://raw.githubusercontent.com/mokagio/UICollectionViewLeftAlignedLayout/master/screenshot.png" />
+
+_Check out the twin project [`UICollectionViewRightAlignedLayout`](https://github.com/mokagio/UICollectionViewRightAlignedLayout)_
+
+## Installation with CocoaPods
+
+```ruby
+platform :ios, '6.0'
+
+pod 'UICollectionViewLeftAlignedLayout'
+```
+
+## Usage
+
+Simply set `UICollectionViewLeftAlignedLayout` as the layout object for your collection view either via code:
+
+```objc
+CGRect frame = ...
+UICollectionViewLeftAlignedLayout *layout = [UICollectionViewLeftAlignedLayout alloc] init];
+UICollectionView *leftAlignedCollectionView = [[UICollectionView alloc] initWithFrame:frame collectionViewLayout:layout];
+```
+
+or from Interface Builder:
+
+_img needed here_
+
+`UICollectionViewLeftAlignedLayout` is a subclass of `UICollectionViewFlowLayout`, so your collection view delegate can use all the delegate methods of [`UICollectionViewDelegateFlowLayout`](https://developer.apple.com/library/ios/documentation/uikit/reference/UICollectionViewDelegateFlowLayout_protocol/Reference/Reference.html).
+
+For those of you who like consistency there is an `UICollectionViewDelegateLeftAlignedLayout` protocol that your delegate object can conform to. Is nothing more than an empty extension of `UICollectionViewDelegateFlowLayout`.
+
+## License
+
+`UICollectionViewLeftAlignedLayout` is released under the [MIT license](https://github.com/mokagio/UICollectionViewLeftAlignedLayout/blob/master/LICENSE).
+
+---
+
+Hacked together with passion by [@mokagio](https://twitter.com/mokagio)

+ 40 - 0
Pods/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.h

@@ -0,0 +1,40 @@
+
+// Copyright (c) 2014 Giovanni Lodi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of
+// this software and associated documentation files (the "Software"), to deal in
+// the Software without restriction, including without limitation the rights to
+// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+// the Software, and to permit persons to whom the Software is furnished to do so,
+// subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+/**
+ *  Simple UICollectionViewFlowLayout that aligns the cells to the left rather than justify them
+ *
+ *  Based on http://stackoverflow.com/questions/13017257/how-do-you-determine-spacing-between-cells-in-uicollectionview-flowlayout
+ */
+
+#import <UIKit/UIKit.h>
+
+@interface UICollectionViewLeftAlignedLayout : UICollectionViewFlowLayout
+
+@end
+
+/**
+ *  Just a convenience protocol to keep things consistent.
+ *  Someone could find it confusing for a delegate object to conform to UICollectionViewDelegateFlowLayout
+ *  while using UICollectionViewLeftAlignedLayout.
+ */
+@protocol UICollectionViewDelegateLeftAlignedLayout <UICollectionViewDelegateFlowLayout>
+
+@end

+ 117 - 0
Pods/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout/UICollectionViewLeftAlignedLayout.m

@@ -0,0 +1,117 @@
+
+// Copyright (c) 2014 Giovanni Lodi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of
+// this software and associated documentation files (the "Software"), to deal in
+// the Software without restriction, including without limitation the rights to
+// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+// the Software, and to permit persons to whom the Software is furnished to do so,
+// subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#import "UICollectionViewLeftAlignedLayout.h"
+
+@interface UICollectionViewLayoutAttributes (LeftAligned)
+
+- (void)leftAlignFrameWithSectionInset:(UIEdgeInsets)sectionInset;
+
+@end
+
+@implementation UICollectionViewLayoutAttributes (LeftAligned)
+
+- (void)leftAlignFrameWithSectionInset:(UIEdgeInsets)sectionInset
+{
+    CGRect frame = self.frame;
+    frame.origin.x = sectionInset.left;
+    self.frame = frame;
+}
+
+@end
+
+#pragma mark -
+
+@implementation UICollectionViewLeftAlignedLayout
+
+#pragma mark - UICollectionViewLayout
+
+- (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect {
+    NSArray *originalAttributes = [super layoutAttributesForElementsInRect:rect];
+    NSMutableArray *updatedAttributes = [NSMutableArray arrayWithArray:originalAttributes];
+    for (UICollectionViewLayoutAttributes *attributes in originalAttributes) {
+        if (!attributes.representedElementKind) {
+            NSUInteger index = [updatedAttributes indexOfObject:attributes];
+            updatedAttributes[index] = [self layoutAttributesForItemAtIndexPath:attributes.indexPath];
+        }
+    }
+
+    return updatedAttributes;
+}
+
+- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath {
+    UICollectionViewLayoutAttributes* currentItemAttributes = [[super layoutAttributesForItemAtIndexPath:indexPath] copy];
+    UIEdgeInsets sectionInset = [self evaluatedSectionInsetForItemAtIndex:indexPath.section];
+
+    BOOL isFirstItemInSection = indexPath.item == 0;
+    CGFloat layoutWidth = CGRectGetWidth(self.collectionView.frame) - sectionInset.left - sectionInset.right;
+
+    if (isFirstItemInSection) {
+        [currentItemAttributes leftAlignFrameWithSectionInset:sectionInset];
+        return currentItemAttributes;
+    }
+
+    NSIndexPath* previousIndexPath = [NSIndexPath indexPathForItem:indexPath.item-1 inSection:indexPath.section];
+    CGRect previousFrame = [self layoutAttributesForItemAtIndexPath:previousIndexPath].frame;
+    CGFloat previousFrameRightPoint = previousFrame.origin.x + previousFrame.size.width;
+    CGRect currentFrame = currentItemAttributes.frame;
+    CGRect strecthedCurrentFrame = CGRectMake(sectionInset.left,
+                                              currentFrame.origin.y,
+                                              layoutWidth,
+                                              currentFrame.size.height);
+    // if the current frame, once left aligned to the left and stretched to the full collection view
+    // widht intersects the previous frame then they are on the same line
+    BOOL isFirstItemInRow = !CGRectIntersectsRect(previousFrame, strecthedCurrentFrame);
+
+    if (isFirstItemInRow) {
+        // make sure the first item on a line is left aligned
+        [currentItemAttributes leftAlignFrameWithSectionInset:sectionInset];
+        return currentItemAttributes;
+    }
+
+    CGRect frame = currentItemAttributes.frame;
+    frame.origin.x = previousFrameRightPoint + [self evaluatedMinimumInteritemSpacingForSectionAtIndex:indexPath.section];
+    currentItemAttributes.frame = frame;
+    return currentItemAttributes;
+}
+
+- (CGFloat)evaluatedMinimumInteritemSpacingForSectionAtIndex:(NSInteger)sectionIndex
+{
+    if ([self.collectionView.delegate respondsToSelector:@selector(collectionView:layout:minimumInteritemSpacingForSectionAtIndex:)]) {
+        id<UICollectionViewDelegateLeftAlignedLayout> delegate = (id<UICollectionViewDelegateLeftAlignedLayout>)self.collectionView.delegate;
+
+        return [delegate collectionView:self.collectionView layout:self minimumInteritemSpacingForSectionAtIndex:sectionIndex];
+    } else {
+        return self.minimumInteritemSpacing;
+    }
+}
+
+- (UIEdgeInsets)evaluatedSectionInsetForItemAtIndex:(NSInteger)index
+{
+    if ([self.collectionView.delegate respondsToSelector:@selector(collectionView:layout:insetForSectionAtIndex:)]) {
+        id<UICollectionViewDelegateLeftAlignedLayout> delegate = (id<UICollectionViewDelegateLeftAlignedLayout>)self.collectionView.delegate;
+
+        return [delegate collectionView:self.collectionView layout:self insetForSectionAtIndex:index];
+    } else {
+        return self.sectionInset;
+    }
+}
+
+@end

+ 1 - 1
model.xcodeproj/project.pbxproj

@@ -3659,7 +3659,7 @@
 				PRODUCT_BUNDLE_IDENTIFIER = com.chmo.model;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE = "";
-				PROVISIONING_PROFILE_SPECIFIER = model;
+				PROVISIONING_PROFILE_SPECIFIER = modelTest;
 			};
 			name = Release;
 		};

+ 51 - 70
model/AppDelegate.m

@@ -44,35 +44,35 @@ NSString *NTESNotificationLogout = @"NTESNotificationLogout";
 
     [NIMSDKConfig sharedConfig].enabledHttpsForInfo = NO;
 
-    //    [[NIMSDK sharedSDK] registerWithAppID:@"c545b95fd20d5a20d0d1220dc6831e4d"
-    //                                  cerName:@"push"];
-
-    //    [self registerAPNs];
+    // [[NIMSDK sharedSDK] registerWithAppID:@"c545b95fd20d5a20d0d1220dc6831e4d"
+    //                               cerName:@"push"];
+    //
+    // [self registerAPNs];
 
     [self setupServices];
     [self registerPushService];
 
 
-//    //判断更控制器
-//    NSString *key = @"CFBundleShortVersionString";
-//    // 获得当前软件的版本号
-//    NSString *currentVersion = [NSBundle mainBundle].infoDictionary[key];
-//    // 获得沙盒中存储的版本号
-//    NSString *sanboxVersion = [[NSUserDefaults standardUserDefaults] stringForKey:key];
-//    if (sanboxVersion == nil || ![sanboxVersion isEqualToString:currentVersion]) { //本地版本号不同, 显示新特性
-//
-//        ModelNewFeatureController *mineVc = [[ModelNewFeatureController alloc] init];
-//        ModelNavigationController *navVC = [[ModelNavigationController alloc] initWithRootViewController:mineVc];
-//        self.window.rootViewController = navVC;
-//
-//        // 将当前的版本号存进沙盒
-//        [[NSUserDefaults standardUserDefaults] setObject:currentVersion forKey:key];
-//        [[NSUserDefaults standardUserDefaults] synchronize];
-//
-//    }else { // 本地版本号相同
-//
-//        [self setupMainViewController];
-//    }
+    // //判断更控制器
+    // NSString *key = @"CFBundleShortVersionString";
+    // // 获得当前软件的版本号
+    // NSString *currentVersion = [NSBundle mainBundle].infoDictionary[key];
+    // // 获得沙盒中存储的版本号
+    // NSString *sanboxVersion = [[NSUserDefaults standardUserDefaults] stringForKey:key];
+    // if (sanboxVersion == nil || ![sanboxVersion isEqualToString:currentVersion]) { //本地版本号不同, 显示新特性
+    //
+    //     ModelNewFeatureController *mineVc = [[ModelNewFeatureController alloc] init];
+    //     ModelNavigationController *navVC = [[ModelNavigationController alloc] initWithRootViewController:mineVc];
+    //     self.window.rootViewController = navVC;
+    //
+    //     // 将当前的版本号存进沙盒
+    //     [[NSUserDefaults standardUserDefaults] setObject:currentVersion forKey:key];
+    //     [[NSUserDefaults standardUserDefaults] synchronize];
+    //
+    // } else { // 本地版本号相同
+    //
+    //     [self setupMainViewController];
+    // }
 
     [self setupMainViewController];
     // 显示窗口
@@ -212,14 +212,14 @@ NSString *NTESNotificationLogout = @"NTESNotificationLogout";
 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
     // Required, iOS 7 Support
     completionHandler(UIBackgroundFetchResultNewData);
-    if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive) {  //此时app在前台运行,我的做法是弹出一个alert,告诉用户有一条推送,用户可以选择查看或者忽略
-//                UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"推送消息"
-//                                                                 message:@"您有一条新的推送消息!"
-//                                                                delegate:self
-//                                                       cancelButtonTitle:@"取消"
-//                                                       otherButtonTitles:@"查看",nil];
-//                [alert show];
-
+    if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive) {
+        // 此时app在前台运行,我的做法是弹出一个alert,告诉用户有一条推送,用户可以选择查看或者忽略
+        // UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"推送消息"
+        //                                                 message:@"您有一条新的推送消息!"
+        //                                                delegate:self
+        //                                       cancelButtonTitle:@"取消"
+        //                                       otherButtonTitles:@"查看", nil];
+        // [alert show];
     } else {
 
         //这里是app未运行或者在后台,通过点击手机通知栏的推送消息打开app时可以在这里进行处理,比如,拿到推送里的内容或者附加      字段(假设,推送里附加了一个url为 www.baidu.com),那么你就可以拿到这个url,然后进行跳转到相应店web页,当然,不一定必须是web页,也可以是你app里的任意一个controll,跳转的话用navigation或者模态视图都可以
@@ -277,12 +277,10 @@ NSString *NTESNotificationLogout = @"NTESNotificationLogout";
 
     [[UIApplication sharedApplication] registerForRemoteNotifications];
 
-
     //pushkit
     PKPushRegistry *pushRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()];
     pushRegistry.delegate = self;
     pushRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP];
-
 }
 
 #pragma mark - 登录错误回调
@@ -295,30 +293,30 @@ NSString *NTESNotificationLogout = @"NTESNotificationLogout";
 
     if ([error.domain isEqualToString:NIMLocalErrorDomain] &&
             error.code == NIMLocalErrorCodeAutoLoginRetryLimit) {
-        UIAlertAction *retryAction = [UIAlertAction actionWithTitle:@"重试"
-                                                              style:UIAlertActionStyleCancel
-                                                            handler:^(UIAlertAction *_Nonnull action) {
-                                                                //                                                                NTESLoginData *data = [[NTESLoginManager sharedManager] currentLoginData];
-                                                                NSUserDefaults *user = [NSUserDefaults standardUserDefaults];
-                                                                NSString *account = [user objectForKey:@"accid"];
-                                                                NSString *token = [user objectForKey:@"token"];
-                                                                //
-                                                                //                                                                NSString *account = [data account];
-                                                                //                                                                NSString *token = [data token];
-                                                                if ([account length] && [token length]) {
-                                                                    NIMAutoLoginData *loginData = [[NIMAutoLoginData alloc] init];
-                                                                    loginData.account = account;
-                                                                    loginData.token = token;
-
-                                                                    [[[NIMSDK sharedSDK] loginManager] autoLogin:loginData];
-                                                                }
-                                                            }];
+        UIAlertAction *retryAction =
+                [UIAlertAction actionWithTitle:@"重试"
+                                         style:UIAlertActionStyleCancel
+                                       handler:^(UIAlertAction *_Nonnull action) {
+                                           // NTESLoginData *data = [[NTESLoginManager sharedManager] currentLoginData];
+                                           NSUserDefaults *user = [NSUserDefaults standardUserDefaults];
+                                           NSString *account = [user objectForKey:@"accid"];
+                                           NSString *token = [user objectForKey:@"token"];
+                                           //
+                                           // NSString *account = [data account];
+                                           // NSString *token = [data token];
+                                           if ([account length] && [token length]) {
+                                               NIMAutoLoginData *loginData = [[NIMAutoLoginData alloc] init];
+                                               loginData.account = account;
+                                               loginData.token = token;
+
+                                               [[[NIMSDK sharedSDK] loginManager] autoLogin:loginData];
+                                           }
+                                       }];
         [vc addAction:retryAction];
     }
 
     LoginViewController *lVc = [[LoginViewController alloc] init];
 
-
     UIAlertAction *logoutAction = [UIAlertAction actionWithTitle:@"注销"
                                                            style:UIAlertActionStyleDestructive
                                                          handler:^(UIAlertAction *_Nonnull action) {
@@ -337,12 +335,6 @@ NSString *NTESNotificationLogout = @"NTESNotificationLogout";
                                                completion:nil];
 }
 
-- (void)applicationWillResignActive:(UIApplication *)application {
-    // 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.
-    // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
-}
-
-
 - (void)applicationDidEnterBackground:(UIApplication *)application {
     NSInteger count = [[[NIMSDK sharedSDK] conversationManager] allUnreadCount];
     [[UIApplication sharedApplication] setApplicationIconBadgeNumber:count];
@@ -350,7 +342,6 @@ NSString *NTESNotificationLogout = @"NTESNotificationLogout";
     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
 }
 
-
 - (void)applicationWillEnterForeground:(UIApplication *)application {
     [[NSNotificationCenter defaultCenter] postNotificationName:@"reloadUnRead" object:nil];
     [[NSNotificationCenter defaultCenter] postNotificationName:@"orderMsg" object:nil];
@@ -358,14 +349,4 @@ NSString *NTESNotificationLogout = @"NTESNotificationLogout";
     // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
 }
 
-
-- (void)applicationDidBecomeActive:(UIApplication *)application {
-    // 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.
-}
-
-
-- (void)applicationWillTerminate:(UIApplication *)application {
-    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
-}
-
 @end

BIN
model/Assets.xcassets/个人中心/.DS_Store


+ 1 - 1
model/Classes/Controllers/Controller/MessageVC/MessageListViewController.m

@@ -47,7 +47,7 @@
 }
 
 - (void)viewWillAppear:(BOOL)animated{
-    [self changeLoginState:@"1"];
+    // [self changeLoginState:@"1"];
     NSInteger count = [[[NIMSDK sharedSDK] conversationManager] allUnreadCount];
     self.navigationController.tabBarItem.badgeValue = count ? [NSString stringWithFormat:@"%ld",count] : nil;
 }

+ 1 - 4
model/Classes/Controllers/Controller/MyProfileVC/InfoEditViewController.m

@@ -65,28 +65,24 @@
             self.infoTextField.placeholder = @"请输入用户名";
             self.infoTextField.text = [ModelUser modelUser].pet;
             break;
-
         case InfoEditTypeAge:
             self.title = @"年龄";
             self.infoTextField.placeholder = @"请输入年龄";
             self.infoTextField.text = [ModelUser modelUser].age;
             self.infoTextField.keyboardType = UIKeyboardTypeNumberPad;
             break;
-
         case InfoEditTypeHeight:
             self.title = @"身高";
             self.infoTextField.placeholder = @"请输入身高(cm)";
             self.infoTextField.text = [ModelUser modelUser].hei;
             self.infoTextField.keyboardType = UIKeyboardTypeDecimalPad;
             break;
-
         case InfoEditTypeWeight:
             self.title = @"体重";
             self.infoTextField.placeholder = @"请输入体重(kg)";
             self.infoTextField.text = [ModelUser modelUser].wei;
             self.infoTextField.keyboardType = UIKeyboardTypeDecimalPad;
             break;
-
         case InfoEditTypeSigature:
             self.title = @"个性签名";
             self.infoTextField.text = [ModelUser modelUser].lname;
@@ -110,6 +106,7 @@
                 make.height.equalTo(container);
                 make.width.mas_equalTo(60);
             }];
+
             UIView *border = [[UIView alloc] init];
             border.backgroundColor = [UIColor colorWithHexString:@"#F2F4F5"];
             [container addSubview:border];

+ 39 - 42
model/Classes/Controllers/Controller/MyProfileVC/ModelHonorViewController.m

@@ -9,10 +9,10 @@
 #import "ModelHonorViewController.h"
 #import "HonorTableViewCell.h"
 
-@interface ModelHonorViewController ()<UITableViewDelegate,UITableViewDataSource,UITextViewDelegate>
+@interface ModelHonorViewController () <UITableViewDelegate, UITableViewDataSource, UITextViewDelegate>
 
-@property (nonatomic, strong) UITableView *listView;
-@property (nonatomic, strong) NSMutableArray *dataSource;
+@property(nonatomic, strong) UITableView *listView;
+@property(nonatomic, strong) NSMutableArray *dataSource;
 
 @end
 
@@ -26,37 +26,33 @@
 }
 
 - (void)viewDidLoad {
-    
     [super viewDidLoad];
-    
     self.view.backgroundColor = RGBValueColor(0xf7f7f7, 1.0);
     self.title = @"我的荣誉";
     self.navigationController.navigationBar.tintColor = RGBValueColor(0x333333, 1);
     self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"添加" style:UIBarButtonItemStylePlain target:self action:@selector(addHonor)];
-    
+
     [self getHonorData];
 }
 
 - (void)getHonorData {
-    [YanCNetWorkManager requestGETWithURLStr:Url_getModelHonor(PublicUrl) parameters:@{@"ModelPK":[ModelUser user].modelpk} finish:^(id dataDic) {
-
-        if ([dataDic[@"msg"] isEqualToString:@"success"]) {
-            NSArray *array = dataDic[@"data"];
-            
-            for (int i=0; i<array.count; i++) {
-                NSDictionary *dic = [array objectAtIndex:i];
-                [self.dataSource addObject:[dic objectForKey:@"honor"]];
-            }
-            
-            [self configUI];
-        }
-    } enError:^(NSError *error) {
-        
-    }];
+    [YanCNetWorkManager requestGETWithURLStr:Url_getModelHonor(PublicUrl)
+                                  parameters:@{@"ModelPK": [ModelUser user].modelpk}
+                                      finish:^(id dataDic) {
+                                          if ([dataDic[@"msg"] isEqualToString:@"success"]) {
+                                              NSArray *array = dataDic[@"data"];
+                                              for (int i = 0; i < array.count; i++) {
+                                                  NSDictionary *dic = array[i];
+                                                  [self.dataSource addObject:dic[@"honor"]];
+                                              }
+                                              [self configUI];
+                                          }
+                                      }
+                                     enError:^(NSError *error) {
+                                     }];
 }
 
 - (void)configUI {
-    
     self.listView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
     self.listView.delegate = self;
     self.listView.dataSource = self;
@@ -67,33 +63,33 @@
     [self.view addSubview:self.listView];
 }
 
--(void)addHonor{
-    
+- (void)addHonor {
+
     [self.dataSource addObject:@""];
     [self.listView reloadData];
 }
 
 - (void)handleSave {
-    
-    NSMutableArray *arr = [[NSMutableArray alloc]init];
-    
+
+    NSMutableArray *arr = [[NSMutableArray alloc] init];
+
     for (NSString *str in self.dataSource) {
         if (str.length > 0) {
-            NSDictionary *dicc = @{@"honor":str};
+            NSDictionary *dicc = @{@"honor": str};
             [arr addObject:dicc];
         }
     }
-    
+
     NSString *jsonStr = [arr mj_JSONString];
-    NSDictionary *dic = @{@"ModelPK":[ModelUser user].modelpk,@"Honor":jsonStr};
-    [YanCNetWorkManager  requestPostWithURLStr:Url_addModelHonor(PublicUrl) parameters:dic finish:^(id dataDic) {
+    NSDictionary *dic = @{@"ModelPK": [ModelUser user].modelpk, @"Honor": jsonStr};
+    [YanCNetWorkManager requestPostWithURLStr:Url_addModelHonor(PublicUrl) parameters:dic finish:^(id dataDic) {
         if ([[dataDic objectForKey:@"msg"] isEqualToString:@"success"]) {
             [MBProgressHUD showSuccess:@"保存成功"];
             [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(backClick) userInfo:nil repeats:NO];
-        }else{
+        } else {
             [MBProgressHUD showSuccess:@"保存失败"];
         }
-    } enError:^(NSError *error) {
+    }                                 enError:^(NSError *error) {
 
     }];
 }
@@ -104,7 +100,7 @@
 
 - (UIView *)footView {
     UIView *footView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, 120)];
-    UIButton *saveBtn = [[UIButton alloc] initWithFrame:CGRectMake(20,  40, ScreenWidth - 40, 48)];
+    UIButton *saveBtn = [[UIButton alloc] initWithFrame:CGRectMake(20, 40, ScreenWidth - 40, 48)];
     saveBtn.layer.cornerRadius = 24.f;
     saveBtn.layer.masksToBounds = YES;
     [saveBtn setTitle:@"保存" forState:UIControlStateNormal];
@@ -115,6 +111,7 @@
 }
 
 #pragma mark -
+
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
     return self.dataSource.count;
 }
@@ -124,20 +121,20 @@
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    
+
     static NSString *cellid = @"HonorTableViewCell";
     HonorTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellid];
 
     if (!cell) {
         cell = [[HonorTableViewCell alloc] init];
     }
-    
+
 //    HonorTableViewCell *cell = [[HonorTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"HonorTableViewCell"];
-    
+
     if (self.dataSource.count > 0) {
         cell.honorTextView.text = self.dataSource[indexPath.section];
     }
-    cell.numberLabel.text = [NSString stringWithFormat:@"%zd",cell.honorTextView.text.length];
+    cell.numberLabel.text = [NSString stringWithFormat:@"%zd", cell.honorTextView.text.length];
     cell.honorTextView.tag = indexPath.section;
     cell.honorTextView.delegate = self;
     return cell;
@@ -157,16 +154,16 @@
 }
 
 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
-    return section == 0 ? 40.f: 10.f;
+    return section == 0 ? 40.f : 10.f;
 }
 
-- (void)textViewDidEndEditing:(UITextView *)textView{
+- (void)textViewDidEndEditing:(UITextView *)textView {
 
     [self.listView reloadData];
 }
 
-- (void)textViewDidChange:(UITextView *)textView{
-    
+- (void)textViewDidChange:(UITextView *)textView {
+
     [self.dataSource replaceObjectAtIndex:textView.tag withObject:textView.text];
 }
 

+ 159 - 115
model/Classes/Controllers/Controller/MyProfileVC/ModelPhotoViewController.m

@@ -9,23 +9,17 @@
 #import "ModelPhotoViewController.h"
 #import "PhotoCollectionViewCell.h"
 #import "PhotoModel.h"
-
-@interface ModelPhotoViewController ()<UICollectionViewDelegate, UICollectionViewDataSource, UIImagePickerControllerDelegate, UINavigationControllerDelegate>
-{
-    UIImagePickerController *pickerVc ;
+#import "Masonry.h"
+#import "UICollectionViewLeftAlignedLayout.h"
+@interface ModelPhotoViewController () <UICollectionViewDelegateFlowLayout, UICollectionViewDataSource, UIImagePickerControllerDelegate, UINavigationControllerDelegate> {
+    UIImagePickerController *pickerVc;
 }
 
-@property (nonatomic, strong) UICollectionView *photoListView;
-
-@property (nonatomic, strong) NSMutableArray *dataSource;
-
-@property (nonatomic, strong) UIButton    *saveBtn;
-
-@property (nonatomic, strong) NSMutableArray *tempUrl;
-
-@property (nonatomic, strong) NSMutableArray *updateData;
-
-@property (nonatomic, strong) NSMutableArray *deleteData;
+@property(nonatomic, strong) UICollectionView *photoListView;
+@property(nonatomic, strong) NSMutableArray *dataSource;
+@property(nonatomic, strong) NSMutableArray *tempUrl;
+@property(nonatomic, strong) NSMutableArray *updateData;
+@property(nonatomic, strong) NSMutableArray *deleteData;
 
 @end
 
@@ -66,103 +60,145 @@
 }
 
 - (void)getModelPhoto {
-    
     [MBProgressHUD showHUDAddedTo:self.view animated:YES];
-    [YanCNetWorkManager requestGETWithURLStr:Url_getModelPhoto(PublicUrl) parameters:@{@"modelpk":[ModelUser user].modelpk} finish:^(id dataDic) {
-        [MBProgressHUD hideHUDForView:self.view animated:YES];
-        
-        if ([dataDic[@"msg"] isEqualToString:@"success"]) {
-            for (NSDictionary *dic in dataDic[@"data"]) {
-                PhotoModel *model = [PhotoModel mj_objectWithKeyValues:dic];
-                [self.dataSource addObject:model];
-            }
-            [self.photoListView reloadData];
-        }
-    } enError:^(NSError *error) {
-        
-    }];
+    [YanCNetWorkManager requestGETWithURLStr:Url_getModelPhoto(PublicUrl)
+                                  parameters:@{@"modelpk": [ModelUser user].modelpk}
+                                      finish:^(id dataDic) {
+                                          [MBProgressHUD hideHUDForView:self.view animated:YES];
+                                          if ([dataDic[@"msg"] isEqualToString:@"success"]) {
+                                              for (NSDictionary *dic in dataDic[@"data"]) {
+                                                  PhotoModel *model = [PhotoModel mj_objectWithKeyValues:dic];
+                                                  [self.dataSource addObject:model];
+                                              }
+                                              [self.photoListView reloadData];
+                                          }
+                                      }
+                                     enError:^(NSError *error) {
+
+                                     }];
 }
 
 - (void)configUI {
-    self.view.backgroundColor = RGBValueColor(0xf7f7f7, 1.0);
+    self.view.backgroundColor = [UIColor colorWithHexString:@"#F2F4F5"];
     self.title = @"照片";
     self.navigationController.navigationBar.tintColor = RGBValueColor(0x333333, 1);
-    //self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"保存" style:UIBarButtonItemStylePlain target:self action:@selector(handleSave)];
-    
-    UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
-    layout.sectionInset = UIEdgeInsetsMake(20, 20, 20, 20);
-    layout.itemSize = CGSizeMake(ScreenWidth/2 - 25, ScreenWidth/2 - 25);
-    layout.minimumLineSpacing = 10;
-    layout.minimumInteritemSpacing = 10;
-    
-    self.photoListView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenWidth) collectionViewLayout:layout];
+    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithTitle:@"保存" style:UIBarButtonItemStylePlain target:self action:@selector(handleSave)];
+    rightItem.tintColor = [UIColor blackColor];
+    self.navigationItem.rightBarButtonItem = rightItem;
+
+    UICollectionViewFlowLayout *layout = [[UICollectionViewLeftAlignedLayout alloc] init];
+
+    self.photoListView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:layout];
     self.photoListView.delegate = self;
     self.photoListView.dataSource = self;
-    self.photoListView.backgroundColor = [UIColor whiteColor];
+    self.photoListView.backgroundColor = [UIColor clearColor];
     [self.photoListView registerNib:[UINib nibWithNibName:@"PhotoCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:NSStringFromClass([PhotoCollectionViewCell class])];
+    [self.photoListView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"headerView"];
     [self.view addSubview:self.photoListView];
-    
-    UILabel *deleteLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, CGRectGetMaxY(self.photoListView.frame), 200, 20)];
-    deleteLabel.text = @"点击可删除照片";
-    deleteLabel.textColor = RGB(102, 102, 102);
-    deleteLabel.font = [UIFont systemFontOfSize:14];
-    [self.view addSubview:deleteLabel];
-    
-    self.saveBtn = [[UIButton alloc] initWithFrame:CGRectMake(20,CGRectGetMaxY(self.photoListView.frame) + 40, ScreenWidth - 40, 48)];
-    self.saveBtn.layer.cornerRadius = 24.f;
-    self.saveBtn.layer.masksToBounds = YES;
-    [self.saveBtn setTitle:@"保存" forState:UIControlStateNormal];
-    [self.saveBtn addTarget:self action:@selector(handleSave) forControlEvents:UIControlEventTouchUpInside];
-    [self.saveBtn setBackgroundImage:[UIImage imageNamed:@"tixian-1"] forState:UIControlStateNormal];
-    [self.view addSubview:self.saveBtn];
+    [self.photoListView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.view);
+        make.bottom.equalTo(self.view);
+        make.left.right.equalTo(self.view);
+    }];
 }
 
 
-
 - (void)backClick {
     [self.navigationController popViewControllerAnimated:YES];
 }
 
 #pragma mark -collectionView
+
+- (CGSize)collectionView:(UICollectionView *)collectionView
+                  layout:(UICollectionViewLayout *)collectionViewLayout
+  sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
+    if (indexPath.row == 0) {
+        return CGSizeMake(ScreenWidth - 40, ScreenWidth - 40);
+    } else {
+        return CGSizeMake((ScreenWidth - 50) / 2, (ScreenWidth - 50) / 2);
+    }
+}
+
+- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView
+                        layout:(UICollectionViewLayout *)collectionViewLayout
+        insetForSectionAtIndex:(NSInteger)section {
+    return UIEdgeInsetsMake(10, 20, 20, 20);
+}
+
+- (CGFloat)          collectionView:(UICollectionView *)collectionView
+                             layout:(UICollectionViewLayout *)collectionViewLayout
+minimumLineSpacingForSectionAtIndex:(NSInteger)section {
+    return 10;
+}
+
+- (CGFloat)               collectionView:(UICollectionView *)collectionView
+                                  layout:(UICollectionViewLayout *)collectionViewLayout
+minimumInteritemSpacingForSectionAtIndex:(NSInteger)section {
+    return 10;
+}
+
 - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
-    
-    return self.dataSource.count+1;
+    return self.dataSource.count + 1;
+}
+
+- (CGSize)       collectionView:(UICollectionView *)collectionView
+                         layout:(UICollectionViewLayout *)collectionViewLayout
+referenceSizeForHeaderInSection:(NSInteger)section {
+    return CGSizeMake(ScreenWidth, 35);
+}
+
+- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView
+           viewForSupplementaryElementOfKind:(NSString *)kind
+                                 atIndexPath:(NSIndexPath *)indexPath {
+    if (kind == UICollectionElementKindSectionHeader) {
+        UICollectionReusableView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"headerView" forIndexPath:indexPath];
+        for (UIView *view in [headerView subviews]) {
+            [view removeFromSuperview];
+        }
+        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(20, 15, ScreenWidth - 40, 20)];
+        label.text = @"点击可删除照片(最少上传5张)";
+        label.font = [UIFont systemFontOfSize:14];
+        label.textColor = [UIColor colorWithHexString:@"#666666"];
+        [headerView addSubview:label];
+        return headerView;
+    }
+    return nil;
 }
 
 - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
-    PhotoCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([PhotoCollectionViewCell class]) forIndexPath:indexPath];
-    
+    PhotoCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([PhotoCollectionViewCell class])
+                                                                              forIndexPath:indexPath];
+    cell.layer.cornerRadius = 8;
+    cell.clipsToBounds = YES;
     if (indexPath.item < self.dataSource.count) {
         PhotoModel *model = self.dataSource[indexPath.item];
-
         if (model.localImage) {
             cell.userImageView.image = model.localImage;
         } else {
-            [cell.userImageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", PublicUrl,model.photo]]];
+            [cell.userImageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", PublicUrl, model.photo]]];
         }
-    }else{
-        cell.userImageView.image = [UIImage imageNamed:@"photo_add"];
+    } else {
+        cell.userImageView.image = nil;
     }
-    
+
     return cell;
 }
 
-- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
-{
+- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
     if (self.dataSource.count == indexPath.item) {
         if (self.dataSource.count >= 9) {
             [MBProgressHUD showSuccess:@"最多不能超过9张"];
-        }else{
+        } else {
             UIAlertController *alertVc = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
             pickerVc = [[UIImagePickerController alloc] init];
             pickerVc.allowsEditing = YES;
             pickerVc.delegate = self;
-            UIAlertAction *library = [UIAlertAction actionWithTitle:@"从相册选择" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+            UIAlertAction *library = [UIAlertAction actionWithTitle:@"从相册选择" style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) {
                 pickerVc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
                 [self presentViewController:pickerVc animated:YES completion:nil];
-                
+
             }];
-            UIAlertAction *camera = [UIAlertAction actionWithTitle:@"拍照" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+            UIAlertAction *camera = [UIAlertAction actionWithTitle:@"拍照" style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) {
                 pickerVc.sourceType = UIImagePickerControllerSourceTypeCamera;
                 [self presentViewController:pickerVc animated:YES completion:nil];
             }];
@@ -172,10 +208,10 @@
             [alertVc addAction:cancel];
             [self presentViewController:alertVc animated:YES completion:nil];
         }
-    }else{
+    } else {
         UIAlertController *alertVc = [UIAlertController alertControllerWithTitle:nil message:@"是否确定删除" preferredStyle:UIAlertControllerStyleAlert];
         UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
-        UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) {
             [self deletePhoto:indexPath.item];
         }];
         [alertVc addAction:cancelAction];
@@ -185,45 +221,53 @@
 }
 
 #pragma mark -imagePickerController
-- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info {
-    UIImage *image = [info objectForKey:@"UIImagePickerControllerEditedImage"];
+
+- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *, id> *)info {
+    UIImage *image = info[@"UIImagePickerControllerEditedImage"];
     [picker dismissViewControllerAnimated:NO completion:nil];
     PhotoModel *model = [[PhotoModel alloc] init];
     model.localImage = image;
-    
+
     NSData *photoData = UIImageJPEGRepresentation(image, 0.5);
     NSInteger length = [photoData length] / 1000;
-    
-    NSLog(@"图片大小:%ld Kb",(long)length);
-    
+
+    NSLog(@"图片大小:%ld Kb", (long) length);
+
     [self.dataSource addObject:model];
     [self.updateData addObject:image];
     [self.photoListView reloadData];
-    
+
     [self uploadImage:image];
 }
 
 
--(void)uploadImage:(UIImage *)image{
-    
+- (void)uploadImage:(UIImage *)image {
+
     [MBProgressHUD showHUDAddedTo:self.view animated:YES];
-    
-    [YanCNetWorkManager requestPostWithURLStr:Url_uploadImage(PublicUrl) fileData:image name:@"img" fileName:@"file.jpg" mimeType:@"image/jpeg" parameters:nil finish:^(id dataDic) {
-        [MBProgressHUD hideHUDForView:self.view animated:YES];
-        [self.tempUrl addObject:dataDic[@"img"]];
-        
-    } enError:^(NSError *error) {
-        [MBProgressHUD hideHUDForView:self.view animated:YES];
-    }];
-    
+    [YanCNetWorkManager requestPostWithURLStr:Url_uploadImage(PublicUrl)
+                                     fileData:image
+                                         name:@"img"
+                                     fileName:@"file.jpg"
+                                     mimeType:@"image/jpeg"
+                                   parameters:nil
+                                       finish:^(id dataDic) {
+                                           [MBProgressHUD hideHUDForView:self.view animated:YES];
+                                           [self.tempUrl addObject:dataDic[@"img"]];
+
+                                       }
+                                      enError:^(NSError *error) {
+                                          [MBProgressHUD hideHUDForView:self.view animated:YES];
+                                      }];
+
 }
 
 
 #pragma mark -
+
 - (void)handleSave {
-    
+
     [self uploadImageThroughURLs:self.tempUrl];
-    
+
 //    [MBProgressHUD showHUDAddedTo:self.view animated:YES];
 //    dispatch_group_t group = dispatch_group_create();
 //
@@ -250,54 +294,54 @@
 //    });
 }
 
--(void)uploadImageThroughURLs:(NSMutableArray *)urls{
-    
+- (void)uploadImageThroughURLs:(NSMutableArray *)urls {
+
     NSString *urlStr = @"";
-    
+
     if (urls.count > 0) {
         urlStr = [urls firstObject];
-        
+
         if (urls.count > 1) {
-            for (int i=1; i<urls.count; i++) {
-                urlStr = [urlStr stringByAppendingFormat:@",%@",urls[i]];
+            for (int i = 1; i < urls.count; i++) {
+                urlStr = [urlStr stringByAppendingFormat:@",%@", urls[i]];
             }
         }
-        
-        NSDictionary *dic = @{@"modelpk":[ModelUser user].modelpk,@"photo":urlStr};
-        
+
+        NSDictionary *dic = @{@"modelpk": [ModelUser user].modelpk, @"photo": urlStr};
+
         [YanCNetWorkManager requestPostWithURLStr:Url_addModelPhoto(PublicUrl) parameters:dic finish:^(id dataDic) {
             if ([dataDic[@"msg"] isEqualToString:@"success"]) {
                 [MBProgressHUD showSuccess:@"保存成功"];
                 [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(backClick) userInfo:nil repeats:NO];
             }
-        } enError:^(NSError *error) {
-            
+        }                                 enError:^(NSError *error) {
+
         }];
-    }else{
+    } else {
         [MBProgressHUD showSuccess:@"保存成功"];
         [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(backClick) userInfo:nil repeats:NO];
     }
 }
 
--(void)deletePhoto:(NSInteger)index{
-    
-    PhotoModel *model = [self.dataSource objectAtIndex:index];
-    
+- (void)deletePhoto:(NSInteger)index {
+
+    PhotoModel *model = self.dataSource[index];
+
     if (model.localImage) {
-        for (UIImage *img in self.updateData ) {
+        for (UIImage *img in self.updateData) {
             if (img == model.localImage) {
                 [self.updateData removeObject:img];
             }
         }
-    }else{
-        NSDictionary *dic = @{@"modelpk":[ModelUser user].modelpk,@"modelphotopk":model.modelphotopk};
-        
+    } else {
+        NSDictionary *dic = @{@"modelpk": [ModelUser user].modelpk, @"modelphotopk": model.modelphotopk};
+
         [YanCNetWorkManager requestPostWithURLStr:Url_deleteModelPhoto(PublicUrl) parameters:dic finish:^(id dataDic) {
             if ([dataDic[@"msg"] isEqualToString:@"success"]) {
-                
+
             }
-        } enError:^(NSError *error) {
-            
+        }                                 enError:^(NSError *error) {
+
         }];
     }
     [self.dataSource removeObjectAtIndex:index];

+ 10 - 3
model/Classes/Controllers/Controller/MySkillsVC/MySkillsController.m

@@ -297,9 +297,16 @@
     subRemindLabel.text = @"快去添加你的技能吧";
     [self.remindView addSubview:subRemindLabel];
 
-    //
-    UIButton *addBtnAction = [[UIButton alloc] initWithFrame:CGRectMake(ScreenWidth / 2 - 50, CGRectGetMaxY(subRemindLabel.frame) + 60, 100, 100)];
-    [addBtnAction setImage:[UIImage imageNamed:@"tianjiajineng"] forState:UIControlStateNormal];
+    UIButton *addBtnAction = [[UIButton alloc] initWithFrame:CGRectMake(ScreenWidth / 2 - 110, CGRectGetMaxY(subRemindLabel.frame) + 60, 220, 44)];
+    [addBtnAction setTitle:@"立即添加" forState:UIControlStateNormal];
+    [addBtnAction setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
+    addBtnAction.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
+    addBtnAction.layer.backgroundColor = [UIColor colorWithRed:255/255.0 green:64/255.0 blue:149/255.0 alpha:1].CGColor;
+    addBtnAction.layer.cornerRadius = 22;
+    addBtnAction.layer.shadowColor = [UIColor colorWithRed:255/255.0 green:64/255.0 blue:149/255.0 alpha:0.36].CGColor;
+    addBtnAction.layer.shadowOffset = CGSizeMake(0,8);
+    addBtnAction.layer.shadowOpacity = 1;
+    addBtnAction.layer.shadowRadius = 10;
     [addBtnAction addTarget:self action:@selector(rightBtnClick) forControlEvents:UIControlEventTouchUpInside];
     [self.remindView addSubview:addBtnAction];
 }

+ 1 - 2
model/Classes/Controllers/Controller/PrivateVC/PrivateSpaceViewController.m

@@ -66,7 +66,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
 
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hideNavigationBar) name:@"hideNavigationBar" object:nil];
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hideNavigationBar) name:@"hideNavigationBar" object:nil];
     
     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
     if ([UIScreen spt_currentScreenMode]== LESScreenModeIPhoneX) {
@@ -85,7 +85,6 @@
 }
 
 -(void)hideNavigationBar{
-    
     self.navigationController.navigationBar.hidden = YES;
 }
 

+ 30 - 15
model/Classes/Controllers/Controller/ShareVC/ShareViewController.m

@@ -10,8 +10,9 @@
 #import "SharePopViewController.h"
 #import <WXApi.h>
 
-@interface ShareViewController() <ShareDelegate>
-@property (weak, nonatomic) IBOutlet UIView *qrcodeContainer;
+@interface ShareViewController () <ShareDelegate>
+@property(weak, nonatomic) IBOutlet UIView *qrcodeContainer;
+@property(weak, nonatomic) IBOutlet UIImageView *img;
 
 @end
 
@@ -35,7 +36,7 @@
 
 - (void)viewDidLayoutSubviews {
     [super viewWillLayoutSubviews];
-    
+
     // gradient
     CAGradientLayer *gl = [CAGradientLayer layer];
     gl.frame = self.view.bounds;
@@ -46,42 +47,42 @@
     [self.view.layer insertSublayer:gl atIndex:0];
 
     self.qrcodeContainer.layer.cornerRadius = 12;
-    
+
     UIImageView *qrcode = [[UIImageView alloc] initWithFrame:CGRectMake(7, 7, self.qrcodeContainer.frame.size.width - 14, self.qrcodeContainer.frame.size.width - 14)];
     qrcode.image = [self generateQRCod:shareUrl(@(self.type), [[NSUserDefaults standardUserDefaults] objectForKey:@"qrcode"]) withSize:qrcode.frame.size.width];
     [self.qrcodeContainer addSubview:qrcode];
 }
 
-- (UIImage*)generateQRCod:(NSString*) content withSize:(CGFloat)size {
+- (UIImage *)generateQRCod:(NSString *)content withSize:(CGFloat)size {
     // 1.创建过滤器,这里的@"CIQRCodeGenerator"是固定的
     CIFilter *filter = [CIFilter filterWithName:@"CIQRCodeGenerator"];
-    
+
     // 2.恢复默认设置
     [filter setDefaults];
-    
+
     // 3. 给过滤器添加数据
     NSData *data = [content dataUsingEncoding:NSUTF8StringEncoding];
     // 注意,这里的value必须是NSData类型
     [filter setValue:data forKeyPath:@"inputMessage"];
-    
+
     // 4. 生成二维码
     CIImage *image = [filter outputImage];
-    
-    
+
+
     CGRect extent = CGRectIntegral(image.extent);
-    CGFloat scale = MIN(size/CGRectGetWidth(extent), size/CGRectGetHeight(extent));
-    
+    CGFloat scale = MIN(size / CGRectGetWidth(extent), size / CGRectGetHeight(extent));
+
     // 1. 创建bitmap
     size_t width = CGRectGetWidth(extent) * scale;
     size_t height = CGRectGetHeight(extent) * scale;
     CGColorSpaceRef cs = CGColorSpaceCreateDeviceGray();
-    CGContextRef bitmapRef = CGBitmapContextCreate(nil, width, height, 8, 0, cs, (CGBitmapInfo)kCGImageAlphaNone);
+    CGContextRef bitmapRef = CGBitmapContextCreate(nil, width, height, 8, 0, cs, (CGBitmapInfo) kCGImageAlphaNone);
     CIContext *context = [CIContext contextWithOptions:nil];
     CGImageRef bitmapImage = [context createCGImage:image fromRect:extent];
     CGContextSetInterpolationQuality(bitmapRef, kCGInterpolationNone);
     CGContextScaleCTM(bitmapRef, scale, scale);
     CGContextDrawImage(bitmapRef, extent, bitmapImage);
-    
+
     // 2.保存bitmap图片
     CGImageRef scaledImage = CGBitmapContextCreateImage(bitmapRef);
     CGContextRelease(bitmapRef);
@@ -89,7 +90,7 @@
     return [UIImage imageWithCGImage:scaledImage];
 }
 
--(void)viewWillAppear:(BOOL)animated{
+- (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
     [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
@@ -138,4 +139,18 @@
     [WXApi sendReq:req];
 }
 
+- (void)setType:(NSInteger)type {
+    _type = type;
+    switch (type) {
+        case 1:
+            self.img.image = [UIImage imageNamed:@"text_yonghuduan"];
+            break;
+        case 2:
+            self.img.image = [UIImage imageNamed:@"text_moteduan"];
+            break;
+        default:
+            break;
+    }
+}
+
 @end

+ 1 - 0
model/Classes/Controllers/Controller/ShareVC/ShareViewController.xib

@@ -12,6 +12,7 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ShareViewController">
             <connections>
+                <outlet property="img" destination="KQD-L6-alg" id="4y3-45-plQ"/>
                 <outlet property="qrcodeContainer" destination="9fy-wv-l4y" id="Hee-E9-4Xu"/>
                 <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
             </connections>

+ 2 - 0
model/Classes/Controllers/Model/ModelUser.m

@@ -32,6 +32,7 @@
     [aCoder encodeObject:_modelpk forKey:@"modelpk"];
     [aCoder encodeObject:_coin_a forKey:@"coin_a"];
     [aCoder encodeObject:_coin_ir forKey:@"coin_ir"];
+    [aCoder encodeObject:_pet forKey:@"pet"];
 }
 
 //解码方法,当把二进制数据转成对象时调用。
@@ -43,6 +44,7 @@
         _modelpk = [aDecoder decodeObjectForKey:@"modelpk"];
         _coin_a = [aDecoder decodeObjectForKey:@"coin_a"];
         _coin_ir = [aDecoder decodeObjectForKey:@"coin_ir"];
+        _pet = [aDecoder decodeObjectForKey:@"pet"];
     }
     return self;
 }

+ 29 - 9
model/Classes/Controllers/View/PhotoCollectionViewCell.xib

@@ -1,36 +1,56 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" misplaced="YES" id="gTV-IL-0wX" customClass="PhotoCollectionViewCell">
-            <rect key="frame" x="0.0" y="0.0" width="163" height="162"/>
+        <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="PhotoCollectionViewCell">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="359"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
-                <rect key="frame" x="0.0" y="0.0" width="163" height="162"/>
+                <rect key="frame" x="0.0" y="0.0" width="393" height="359"/>
                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                 <subviews>
-                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="photo_add" id="8Qa-ou-PwC">
-                        <rect key="frame" x="0.0" y="0.0" width="162" height="162"/>
+                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="SsQ-Cu-1nY">
+                        <rect key="frame" x="159.5" y="143" width="74" height="73"/>
+                        <subviews>
+                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_tianjia" translatesAutoresizingMaskIntoConstraints="NO" id="D7I-wM-Nhz">
+                                <rect key="frame" x="0.0" y="0.0" width="74" height="46"/>
+                            </imageView>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="添加照片" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="McA-bR-T5y">
+                                <rect key="frame" x="0.0" y="56" width="74" height="17"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                        </subviews>
+                    </stackView>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8Qa-ou-PwC">
+                        <rect key="frame" x="0.0" y="0.0" width="392" height="359"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                     </imageView>
                 </subviews>
             </view>
+            <color key="backgroundColor" red="0.67843137254901964" green="0.67843137254901964" blue="0.67843137254901964" alpha="1" colorSpace="calibratedRGB"/>
+            <constraints>
+                <constraint firstItem="SsQ-Cu-1nY" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="6jJ-tL-elj"/>
+                <constraint firstItem="SsQ-Cu-1nY" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" id="caY-aP-9NE"/>
+            </constraints>
+            <size key="customSize" width="393" height="359"/>
             <connections>
                 <outlet property="userImageView" destination="8Qa-ou-PwC" id="r4r-Hx-8kz"/>
             </connections>
-            <point key="canvasLocation" x="34" y="54"/>
+            <point key="canvasLocation" x="-26" y="197"/>
         </collectionViewCell>
     </objects>
     <resources>
-        <image name="photo_add" width="165" height="165"/>
+        <image name="icon_tianjia" width="74" height="46"/>
     </resources>
 </document>

+ 101 - 101
model/Classes/Public/RegisterViewController.m

@@ -10,12 +10,12 @@
 #import "LoginViewController.h"
 #import "AgreementViewController.h"
 #import "privateViewController.h"
+
 #define SET_WIFI_TIMES 60
 
-@interface RegisterViewController ()<UITextFieldDelegate>
-{
-    UILabel * _dcLab; //倒计时lab
-    NSTimer * _timer; //倒计时定时器
+@interface RegisterViewController () <UITextFieldDelegate> {
+    UILabel *_dcLab; //倒计时lab
+    NSTimer *_timer; //倒计时定时器
     UITextField *input;
     UIButton *deleteBtn;
     UIButton *getCodeBtn;
@@ -30,54 +30,53 @@
     BOOL canUsePhone;
     int dcTimes;
 }
-@property (weak, nonatomic) IBOutlet UITableView *tableView;
-@property (weak, nonatomic) IBOutlet UIButton *registerBtn;
-@property (weak, nonatomic) IBOutlet NSLayoutConstraint *tableHeight;
-@property (weak, nonatomic) IBOutlet UILabel *agrementLabel;
-@property (weak, nonatomic) IBOutlet UILabel *privateLabel;
+@property(weak, nonatomic) IBOutlet UITableView *tableView;
+@property(weak, nonatomic) IBOutlet UIButton *registerBtn;
+@property(weak, nonatomic) IBOutlet NSLayoutConstraint *tableHeight;
+@property(weak, nonatomic) IBOutlet UILabel *agrementLabel;
+@property(weak, nonatomic) IBOutlet UILabel *privateLabel;
 @end
 
-@implementation RegisterViewController
-{
-    NSString * randomCode;
+@implementation RegisterViewController {
+    NSString *randomCode;
     BOOL isRight;
     BOOL isSel;
 }
 - (void)viewDidLoad {
     [super viewDidLoad];
-    
-    if ([UIScreen spt_currentScreenMode]== LESScreenModeIPhoneX){
-        
+
+    if ([UIScreen spt_currentScreenMode] == LESScreenModeIPhoneX) {
+
         self.tableHeight.constant = 400;
     }
-    UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
+    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
     btn.frame = CGRectMake(0, 0, 40, 40);
     [btn setImage:[UIImage imageNamed:@"fanhui2"] forState:UIControlStateNormal];
-    btn.imageEdgeInsets =  UIEdgeInsetsMake(0, -20, 0, 0);
+    btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
     [btn addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside];
     UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithCustomView:btn];
-    UIBarButtonItem *nagetiveSpacer = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
+    UIBarButtonItem *nagetiveSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
     nagetiveSpacer.width = -12;//这个值可以根据自己需要自己调整
     self.navigationItem.leftBarButtonItems = @[nagetiveSpacer, leftItem];
     self.navigationItem.title = @"新用户注册";
     self.tableView.scrollEnabled = NO;
     UITapGestureRecognizer *argeementTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(toArgeement:)];
-    [self.agrementLabel  addGestureRecognizer:argeementTap];
+    [self.agrementLabel addGestureRecognizer:argeementTap];
     self.agrementLabel.userInteractionEnabled = YES;
-    
+
     UITapGestureRecognizer *privateTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(toPrivate:)];
-    [self.privateLabel  addGestureRecognizer:privateTap];
+    [self.privateLabel addGestureRecognizer:privateTap];
     self.privateLabel.userInteractionEnabled = YES;
     // Do any additional setup after loading the view.
 }
 
--(void)backClick{
-    LoginViewController *lVc = [[LoginViewController alloc]init];
+- (void)backClick {
+    LoginViewController *lVc = [[LoginViewController alloc] init];
     [self.navigationController pushViewController:lVc animated:NO];
 }
 
-- (void)successBack{
-    LoginViewController *lVc = [[LoginViewController alloc]init];
+- (void)successBack {
+    LoginViewController *lVc = [[LoginViewController alloc] init];
     lVc.registerAccount = phoneNum;
     lVc.registerPwd = password;
     [self.navigationController pushViewController:lVc animated:NO];
@@ -88,19 +87,20 @@
     isSel = !isSel;
 }
 
-- (void)toArgeement:(UITapGestureRecognizer*)recognizer{
-    AgreementViewController *aVc = [[AgreementViewController alloc]init];
+- (void)toArgeement:(UITapGestureRecognizer *)recognizer {
+    AgreementViewController *aVc = [[AgreementViewController alloc] init];
     [self.navigationController pushViewController:aVc animated:YES];
 }
 
-- (void)toPrivate:(UITapGestureRecognizer*)recognizer{
-    privateViewController *pVc = [[privateViewController alloc]init];
+- (void)toPrivate:(UITapGestureRecognizer *)recognizer {
+    privateViewController *pVc = [[privateViewController alloc] init];
     [self.navigationController pushViewController:pVc animated:YES];
 }
 
-- (void)viewWillAppear:(BOOL)animated{
+- (void)viewWillAppear:(BOOL)animated {
     dcTimes = SET_WIFI_TIMES;
 }
+
 - (IBAction)toRegister:(id)sender {
 //    if([password isEqualToString:repassword]&&password.length!=0&&repassword.length!=0&&nickName.length!=0&&phoneNum.length!=0&&pkCode.length!=0&&code.length!=0&&[code isEqualToString:randomCode]){
 //        if(isSel){
@@ -115,29 +115,29 @@
     [self check];
 }
 
-- (void)check{
-    if (nickName.length==0){
+- (void)check {
+    if (nickName.length == 0) {
         [MBProgressHUD showOnlyText:@"请填写正确昵称" controller:self];
         return;
     }
-    if (phoneNum.length==0) {
+    if (phoneNum.length == 0) {
         [MBProgressHUD showOnlyText:@"请填写正确手机号" controller:self];
         return;
     }
-    if (password.length<6) {
+    if (password.length < 6) {
         [MBProgressHUD showOnlyText:@"请填写至少6位数密码" controller:self];
         return;
     }
-    if (repassword.length<6) {
+    if (repassword.length < 6) {
         [MBProgressHUD showOnlyText:@"请填写至少6位数密码" controller:self];
         return;
     }
 
-    if (code.length==0){
+    if (code.length == 0) {
         [MBProgressHUD showOnlyText:@"请填写正确验证码" controller:self];
         return;
     }
-    if (![code isEqualToString:randomCode]){
+    if (![code isEqualToString:randomCode]) {
         [MBProgressHUD showOnlyText:@"请填写正确验证码" controller:self];
         return;
     }
@@ -145,28 +145,28 @@
         [MBProgressHUD showOnlyText:@"两次输入密码必须一致" controller:self];
         return;
     }
-    if(isSel){
+    if (isSel) {
         [self doRegister];
-    }else{
+    } else {
         [MBProgressHUD showTextHUD:@"请勾选阅读协议" inView:self.view hideAfterDelay:1];
     }
 }
 
--(void)havePhone{
-    
+- (void)havePhone {
+
     [MBProgressHUD showHUDAddedTo:self.view animated:YES];
-    NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys:phoneNum,@"Phone", nil];
-    
+    NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys:phoneNum, @"Phone", nil];
+
     [YanCNetWorkManager requestPostWithURLStr:Url_testPhone(PublicUrl) parameters:dic finish:^(id dataDic) {
         [MBProgressHUD hideHUDForView:self.view animated:YES];
-        
+
         NSString *issuccess = dataDic[@"msg"];
         if ([issuccess isEqualToString:@"success"]) {
-            
-            NSString * desc = [dataDic objectForKey:@"desc"];
+
+            NSString *desc = [dataDic objectForKey:@"desc"];
             if ([desc isEqualToString:@"未注册"]) {
                 canUsePhone = YES;
-                if([getCodeLabel.text isEqualToString:@"获取验证码"]){
+                if ([getCodeLabel.text isEqualToString:@"获取验证码"]) {
                     _timer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                               target:self
                                                             selector:@selector(downTimes:)
@@ -174,7 +174,7 @@
                                                              repeats:YES];
                     [_timer fire];
                     [self getNum];
-                }else if ([getCodeLabel.text isEqualToString:@"重新获取"]){
+                } else if ([getCodeLabel.text isEqualToString:@"重新获取"]) {
                     _timer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                                               target:self
                                                             selector:@selector(downTimes:)
@@ -183,58 +183,57 @@
                     [_timer fire];
                     [self getNum];
                 }
-            }else if([desc isEqualToString:@"已注册"]){
+            } else if ([desc isEqualToString:@"已注册"]) {
                 [MBProgressHUD showInfo:@"手机号已注册"];
             }
-        }else {
+        } else {
             [MBProgressHUD showInfo:@"请求失败!"];
         }
-    } enError:^(NSError *error) {
+    }                                 enError:^(NSError *error) {
         [MBProgressHUD hideHUDForView:self.view animated:YES];
     }];
 }
 
 
+- (void)doRegister {
 
--(void)doRegister{
-    
     [MBProgressHUD showHUDAddedTo:self.view animated:YES];
-    NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys:phoneNum,@"mobile",password,@"pass",nickName,@"pet",pkCode,@"introducerpk", nil];
-    
+    NSDictionary *dic = @{@"mobile": phoneNum, @"pass": password, @"pet": nickName, @"qrcode": pkCode};
+
     [YanCNetWorkManager requestPostWithURLStr:Url_doRegister(PublicUrl) parameters:dic finish:^(id dataDic) {
         [MBProgressHUD hideHUDForView:self.view animated:YES];
-        
+
         NSString *issuccess = dataDic[@"msg"];
         if ([issuccess isEqualToString:@"success"]) {
-            
+
             [MBProgressHUD showInfo:@"注册成功"];
             [self successBack];
 
-        }else if ([dataDic[@"msg"] isEqualToString:@"fail"]){
+        } else if ([dataDic[@"msg"] isEqualToString:@"fail"]) {
             NSString *str = dataDic[@"desc"];
             [MBProgressHUD showTextHUD:str inView:self.view hideAfterDelay:1];
-        }else {
+        } else {
             [MBProgressHUD showInfo:@"注册失败"];
         }
         [self.tableView reloadData];
-    } enError:^(NSError *error) {
+    }                                 enError:^(NSError *error) {
         [MBProgressHUD hideHUDForView:self.view animated:YES];
     }];
 }
 
--(void)getNum{
+- (void)getNum {
     NSString *sn = @"SDK-FHD-010-00328";
     //NSString *md5Pwd = [MD5String md5String:[NSString stringWithFormat:@"%@%@",sn,password]];
     NSString *Md5Pwd = @"54774CB6E781A142206F756B3E18142C";
     int a = arc4random() % 100000;
-    
+
     randomCode = [NSString stringWithFormat:@"%06d", a];
-    
-    NSString *content = [NSString stringWithFormat:@"【千模科技】验证码%@,快注册,你的人生即将开挂,更快挣钱,更多代言和影视表演机会都在千模。非本人操作,请勿理会。",randomCode];
-    
-    NSString *str = [NSString stringWithFormat:@"http://sdk.entinfo.cn:8061/mdsmssend.ashx?sn=%@&pwd=%@&mobile=%@&content=%@&ext=&stime=&rrid=&msgfmt=",sn,Md5Pwd,phoneNum,content];
+
+    NSString *content = [NSString stringWithFormat:@"【千模科技】验证码%@,快注册,你的人生即将开挂,更快挣钱,更多代言和影视表演机会都在千模。非本人操作,请勿理会。", randomCode];
+
+    NSString *str = [NSString stringWithFormat:@"http://sdk.entinfo.cn:8061/mdsmssend.ashx?sn=%@&pwd=%@&mobile=%@&content=%@&ext=&stime=&rrid=&msgfmt=", sn, Md5Pwd, phoneNum, content];
 //    NSString *str = @"";
-    NSLog(@"str=%@",str);
+    NSLog(@"str=%@", str);
 //    NSURL *url = [NSURL URLWithString:@"http://222.73.161.212/ispace2/servlet/com.lemon.xml.XmlAction"];
 //
 //    //A Boolean value that turns an indicator of network activity on or off.
@@ -252,57 +251,60 @@
 //    else {
 //        NSLog(@"File read succeed!:%@",xmlString);
 //    }
-    
-    AFHTTPSessionManager *manager =[AFHTTPSessionManager manager];
+
+    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
     manager.responseSerializer = [AFHTTPResponseSerializer serializer];
     [manager GET:[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) {
-        NSString *result = [[NSString alloc]initWithData:responseObject encoding:NSUTF8StringEncoding];
+        NSString *result = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
         isRight = [result containsString:@"-"];
-        NSLog(@"%@",result);
-    } failure:^(NSURLSessionDataTask *task, NSError *error) {
-        NSLog(@"%@",error);
+        NSLog(@"%@", result);
+    }    failure:^(NSURLSessionDataTask *task, NSError *error) {
+        NSLog(@"%@", error);
     }];
 }
 
 #pragma mark tableViewDelegate
--(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
     return 1;
 }
-- (CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
-{
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
 
     return 0.1;
 }
 
--(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
 
     return 50;
 }
--(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
 
     return 6;
 }
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     static NSString *CellIdentifier = @"Cell";
-    
+
     UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
     if (!cell) {
         cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier];
     }
-    input = [[UITextField alloc]initWithFrame:CGRectMake(100, 5, 200, 40)];
+    input = [[UITextField alloc] initWithFrame:CGRectMake(100, 5, 200, 40)];
     input.backgroundColor = [UIColor clearColor];
     input.delegate = self;
     [input addTarget:self action:@selector(textFieldwithText:) forControlEvents:UIControlEventEditingChanged];
     [input setTextAlignment:NSTextAlignmentLeft];
     [cell addSubview:input];
-    
-    deleteBtn = [[UIButton alloc]initWithFrame:CGRectMake(ScreenWidth-20-17, 16, 17, 17)];
+
+    deleteBtn = [[UIButton alloc] initWithFrame:CGRectMake(ScreenWidth - 20 - 17, 16, 17, 17)];
     [deleteBtn setImage:[UIImage imageNamed:@"shanchu"] forState:UIControlStateNormal];
     [deleteBtn addTarget:self action:@selector(delete) forControlEvents:UIControlEventTouchUpInside];
-    getCodeBtn = [[UIButton alloc]initWithFrame:CGRectMake(ScreenWidth-20-97,10 , 97, 30)];
+    getCodeBtn = [[UIButton alloc] initWithFrame:CGRectMake(ScreenWidth - 20 - 97, 10, 97, 30)];
     [getCodeBtn setImage:[UIImage imageNamed:@"yanzhengma"] forState:UIControlStateNormal];
-    
-    getCodeLabel = [[UILabel alloc]initWithFrame:CGRectMake(10 ,5, 80, 20)];
+
+    getCodeLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 5, 80, 20)];
     getCodeLabel.text = @"获取验证码";
     getCodeLabel.textAlignment = NSTextAlignmentCenter;
     getCodeLabel.font = [UIFont systemFontOfSize:14];
@@ -363,15 +365,15 @@
     return YES;
 }
 
-- (void)delete{
+- (void)delete {
     phoneNum = @"";
     [self.tableView reloadData];
 }
 
-- (void)getCode{
+- (void)getCode {
     if ([Helper valiMobile:phoneNum]) {
         [self havePhone];
-    }else{
+    } else {
         [MBProgressHUD showInfo:@"请填写正确手机号"];
     }
 //    if (canUsePhone) {
@@ -400,20 +402,18 @@
 //    }
 }
 
-- (void)timeInvalidates
-{
+- (void)timeInvalidates {
     dcTimes = SET_WIFI_TIMES;
     [_timer invalidate];
     _timer = nil;
-    
-    
+
+
 }
 
-- (void)downTimes:(NSTimer*)time
-{
+- (void)downTimes:(NSTimer *)time {
     if (dcTimes > 0) {
         getCodeLabel.text = [NSString stringWithFormat:@"%ds", dcTimes];
-        
+
         dcTimes--;
     } else {
         getCodeLabel.text = @"重新获取";
@@ -426,13 +426,13 @@
     }
 }
 
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
-    
-    
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+
+
 }
 
-- (void)textFieldwithText:(UITextField*)textField{
-    switch (textField.tag-100) {
+- (void)textFieldwithText:(UITextField *)textField {
+    switch (textField.tag - 100) {
         case 1:
             nickName = textField.text;
             break;

Некоторые файлы не были показаны из-за большого количества измененных файлов