瀏覽代碼

no message

Fenix Wang 8 年之前
父節點
當前提交
c4d300ecf9
共有 65 個文件被更改,包括 2531 次插入107 次删除
  1. 二進制
      NIMDemo/NIM.xcworkspace/xcuserdata/Fenix.xcuserdatad/UserInterfaceState.xcuserstate
  2. 48 6
      NIMDemo/NIMDemo.xcodeproj/project.pbxproj
  3. 482 33
      NIMDemo/NIMDemo/Base.lproj/Main.storyboard
  4. 7 6
      NIMDemo/NIMDemo/Classes/Sections/Contact/ViewController/Contact/NTESBlackListViewController.m
  5. 5 2
      NIMDemo/NIMDemo/Classes/Util/NTESSessionUtil.m
  6. 6 5
      NIMDemo/NIMDemo/FriendViewController.m
  7. 13 0
      NIMDemo/NIMDemo/HobbyViewController.h
  8. 164 0
      NIMDemo/NIMDemo/HobbyViewController.m
  9. 25 0
      NIMDemo/NIMDemo/HttpRequest/HttpRequest.h
  10. 256 8
      NIMDemo/NIMDemo/HttpRequest/HttpRequest.m
  11. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/120x120-1.png
  12. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/120x120.png
  13. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/180x180.png
  14. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/58x58.png
  15. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/80x80.png
  16. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/87x87.png
  17. 6 6
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Contents.json
  18. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo120-1.png
  19. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo120.png
  20. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo180.png
  21. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo58.png
  22. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo80-1.png
  23. 二進制
      NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo80.png
  24. 21 0
      NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo120.imageset/Contents.json
  25. 二進制
      NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo120.imageset/Logo120.png
  26. 21 0
      NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo180.imageset/Contents.json
  27. 二進制
      NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo180.imageset/Logo180.png
  28. 21 0
      NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo58.imageset/Contents.json
  29. 二進制
      NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo58.imageset/Logo58.png
  30. 21 0
      NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo80.imageset/Contents.json
  31. 二進制
      NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo80.imageset/Logo80.png
  32. 21 0
      NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo87.imageset/Contents.json
  33. 二進制
      NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo87.imageset/Logo87.png
  34. 18 2
      NIMDemo/NIMDemo/MyUserInfoViewController.m
  35. 15 0
      NIMDemo/NIMDemo/NearUserTableViewCell.h
  36. 54 0
      NIMDemo/NIMDemo/NearUserTableViewCell.m
  37. 13 0
      NIMDemo/NIMDemo/NearUserViewController.h
  38. 122 0
      NIMDemo/NIMDemo/NearUserViewController.m
  39. 13 0
      NIMDemo/NIMDemo/SectionSetting/AddPhotoViewController.h
  40. 199 0
      NIMDemo/NIMDemo/SectionSetting/AddPhotoViewController.m
  41. 13 0
      NIMDemo/NIMDemo/SectionSetting/ChangePasswordViewController.h
  42. 107 0
      NIMDemo/NIMDemo/SectionSetting/ChangePasswordViewController.m
  43. 13 0
      NIMDemo/NIMDemo/SectionSetting/FeedBackViewController.h
  44. 158 0
      NIMDemo/NIMDemo/SectionSetting/FeedBackViewController.m
  45. 13 0
      NIMDemo/NIMDemo/SectionSetting/PrivacyViewController.h
  46. 193 0
      NIMDemo/NIMDemo/SectionSetting/PrivacyViewController.m
  47. 4 0
      NIMDemo/NIMDemo/SectionSetting/SettingSecurityViewController.m
  48. 36 6
      NIMDemo/NIMDemo/SectionTrade/TradeDetailViewController.m
  49. 6 4
      NIMDemo/NIMDemo/SectionTrade/TradeTableViewCell.m
  50. 59 5
      NIMDemo/NIMDemo/SettingAccountViewController.m
  51. 3 1
      NIMDemo/NIMDemo/SettingOptionTableViewCell.m
  52. 14 5
      NIMDemo/NIMDemo/SettingTableViewController.m
  53. 1 0
      NIMDemo/NIMDemo/SettingTopTableViewCell.h
  54. 153 2
      NIMDemo/NIMDemo/SettingTopTableViewCell.m
  55. 1 0
      NIMDemo/NIMDemo/SocialTableViewCell.h
  56. 1 0
      NIMDemo/NIMDemo/SocialTableViewCell.m
  57. 10 0
      NIMDemo/NIMDemo/SocialTableViewController.m
  58. 63 2
      NIMDemo/NIMDemo/SocialTopTableViewCell.m
  59. 3 1
      NIMDemo/NIMDemo/TabBarController.m
  60. 7 1
      NIMDemo/NIMDemo/User.h
  61. 36 1
      NIMDemo/NIMDemo/User.m
  62. 18 0
      NIMDemo/NIMDemo/UserInfo.h
  63. 31 0
      NIMDemo/NIMDemo/UserInfo.m
  64. 25 4
      NIMDemo/NIMDemo/UserInfoViewController.m
  65. 12 7
      NIMKit/NIMKit/Classes/Sections/SessionList/NIMSessionListViewController.m

二進制
NIMDemo/NIM.xcworkspace/xcuserdata/Fenix.xcuserdatad/UserInterfaceState.xcuserstate


+ 48 - 6
NIMDemo/NIMDemo.xcodeproj/project.pbxproj

@@ -281,6 +281,13 @@
 		C4DB33A61F20A83E0080D72F /* UserGiftViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4DB33A51F20A83E0080D72F /* UserGiftViewController.m */; };
 		C4DB33A91F2445AF0080D72F /* UserInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = C4DB33A81F2445AF0080D72F /* UserInfo.m */; };
 		C4DB33AC1F245A910080D72F /* MyUserInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4DB33AB1F245A910080D72F /* MyUserInfoViewController.m */; };
+		C4DB33AF1F25A61A0080D72F /* NearUserViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4DB33AE1F25A61A0080D72F /* NearUserViewController.m */; };
+		C4DB33B21F25A69F0080D72F /* NearUserTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C4DB33B11F25A69F0080D72F /* NearUserTableViewCell.m */; };
+		C4DB33B51F25BFA70080D72F /* ChangePasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4DB33B41F25BFA70080D72F /* ChangePasswordViewController.m */; };
+		C4DB33B81F25DA6F0080D72F /* PrivacyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4DB33B71F25DA6F0080D72F /* PrivacyViewController.m */; };
+		C4DB33BB1F25F7720080D72F /* FeedBackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4DB33BA1F25F7720080D72F /* FeedBackViewController.m */; };
+		C4DB33BE1F2709240080D72F /* HobbyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4DB33BD1F2709240080D72F /* HobbyViewController.m */; };
+		C4DB33C11F273EFB0080D72F /* AddPhotoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4DB33C01F273EFB0080D72F /* AddPhotoViewController.m */; };
 		C4F1D0EB1EF8F1B800A04B28 /* SocialTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4F1D0EA1EF8F1B800A04B28 /* SocialTableViewController.m */; };
 		C4F1D0EE1EF8F2E800A04B28 /* SocialTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C4F1D0ED1EF8F2E800A04B28 /* SocialTableViewCell.m */; };
 		C4F1D0F11EF8F75400A04B28 /* SocialPublishViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4F1D0F01EF8F75400A04B28 /* SocialPublishViewController.m */; };
@@ -669,8 +676,8 @@
 		C482C2F41F09DAA800EF2B71 /* TradePublishManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TradePublishManager.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionTrade/TradePublishManager.m; sourceTree = "<group>"; };
 		C482C2F91F0A110E00EF2B71 /* TradePostTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TradePostTableViewCell.h; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionTrade/TradePostTableViewCell.h; sourceTree = "<group>"; };
 		C482C2FA1F0A110E00EF2B71 /* TradePostTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TradePostTableViewCell.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionTrade/TradePostTableViewCell.m; sourceTree = "<group>"; };
-		C482C2FC1F0A3B0000EF2B71 /* SettingTopTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SettingTopTableViewCell.h; path = ../../../../../../../../XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SettingTopTableViewCell.h; sourceTree = BUILT_PRODUCTS_DIR; };
-		C482C2FD1F0A3B0000EF2B71 /* SettingTopTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SettingTopTableViewCell.m; path = ../../../../../../../../XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SettingTopTableViewCell.m; sourceTree = BUILT_PRODUCTS_DIR; };
+		C482C2FC1F0A3B0000EF2B71 /* SettingTopTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SettingTopTableViewCell.h; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SettingTopTableViewCell.h; sourceTree = "<group>"; };
+		C482C2FD1F0A3B0000EF2B71 /* SettingTopTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SettingTopTableViewCell.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SettingTopTableViewCell.m; sourceTree = "<group>"; };
 		C482C2FF1F0A792300EF2B71 /* SettingOptionTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingOptionTableViewCell.h; sourceTree = "<group>"; };
 		C482C3001F0A792300EF2B71 /* SettingOptionTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingOptionTableViewCell.m; sourceTree = "<group>"; };
 		C482C3021F0A7E8400EF2B71 /* MyTradeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyTradeViewController.h; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionTrade/MyTradeViewController.h; sourceTree = "<group>"; };
@@ -718,10 +725,10 @@
 		C482C34A1F187A4100EF2B71 /* UserInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UserInfoViewController.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/UserInfoViewController.m; sourceTree = "<group>"; };
 		C482C34C1F1889DB00EF2B71 /* SettingInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingInfoViewController.h; sourceTree = "<group>"; };
 		C482C34D1F1889DB00EF2B71 /* SettingInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingInfoViewController.m; sourceTree = "<group>"; };
-		C482C34F1F1CC04800EF2B71 /* SettingSecurityViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SettingSecurityViewController.h; path = ../../../../../../../../XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/SettingSecurityViewController.h; sourceTree = BUILT_PRODUCTS_DIR; };
-		C482C3501F1CC04800EF2B71 /* SettingSecurityViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SettingSecurityViewController.m; path = ../../../../../../../../XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/SettingSecurityViewController.m; sourceTree = BUILT_PRODUCTS_DIR; };
-		C482C3521F1D9DF100EF2B71 /* ChangeMobileViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChangeMobileViewController.h; path = ../../../../../../../../XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/ChangeMobileViewController.h; sourceTree = BUILT_PRODUCTS_DIR; };
-		C482C3531F1D9DF100EF2B71 /* ChangeMobileViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ChangeMobileViewController.m; path = ../../../../../../../../XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/ChangeMobileViewController.m; sourceTree = BUILT_PRODUCTS_DIR; };
+		C482C34F1F1CC04800EF2B71 /* SettingSecurityViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SettingSecurityViewController.h; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/SettingSecurityViewController.h; sourceTree = "<group>"; };
+		C482C3501F1CC04800EF2B71 /* SettingSecurityViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SettingSecurityViewController.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/SettingSecurityViewController.m; sourceTree = "<group>"; };
+		C482C3521F1D9DF100EF2B71 /* ChangeMobileViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChangeMobileViewController.h; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/ChangeMobileViewController.h; sourceTree = "<group>"; };
+		C482C3531F1D9DF100EF2B71 /* ChangeMobileViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ChangeMobileViewController.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/ChangeMobileViewController.m; sourceTree = "<group>"; };
 		C482C3551F1DD41B00EF2B71 /* PayOptionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PayOptionViewController.h; sourceTree = "<group>"; };
 		C482C3561F1DD41B00EF2B71 /* PayOptionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PayOptionViewController.m; sourceTree = "<group>"; };
 		C4A7345E1EE6BBD300D6489D /* GroupMoreTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupMoreTableViewController.h; sourceTree = "<group>"; };
@@ -871,6 +878,20 @@
 		C4DB33A81F2445AF0080D72F /* UserInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInfo.m; sourceTree = "<group>"; };
 		C4DB33AA1F245A910080D72F /* MyUserInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyUserInfoViewController.h; sourceTree = "<group>"; };
 		C4DB33AB1F245A910080D72F /* MyUserInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyUserInfoViewController.m; sourceTree = "<group>"; };
+		C4DB33AD1F25A61A0080D72F /* NearUserViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NearUserViewController.h; sourceTree = "<group>"; };
+		C4DB33AE1F25A61A0080D72F /* NearUserViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NearUserViewController.m; sourceTree = "<group>"; };
+		C4DB33B01F25A69F0080D72F /* NearUserTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NearUserTableViewCell.h; sourceTree = "<group>"; };
+		C4DB33B11F25A69F0080D72F /* NearUserTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NearUserTableViewCell.m; sourceTree = "<group>"; };
+		C4DB33B31F25BFA70080D72F /* ChangePasswordViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChangePasswordViewController.h; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/ChangePasswordViewController.h; sourceTree = "<group>"; };
+		C4DB33B41F25BFA70080D72F /* ChangePasswordViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ChangePasswordViewController.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/ChangePasswordViewController.m; sourceTree = "<group>"; };
+		C4DB33B61F25DA6F0080D72F /* PrivacyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrivacyViewController.h; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/PrivacyViewController.h; sourceTree = "<group>"; };
+		C4DB33B71F25DA6F0080D72F /* PrivacyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PrivacyViewController.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/PrivacyViewController.m; sourceTree = "<group>"; };
+		C4DB33B91F25F7720080D72F /* FeedBackViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FeedBackViewController.h; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/FeedBackViewController.h; sourceTree = "<group>"; };
+		C4DB33BA1F25F7720080D72F /* FeedBackViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FeedBackViewController.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/FeedBackViewController.m; sourceTree = "<group>"; };
+		C4DB33BC1F2709240080D72F /* HobbyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HobbyViewController.h; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/HobbyViewController.h; sourceTree = "<group>"; };
+		C4DB33BD1F2709240080D72F /* HobbyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HobbyViewController.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/HobbyViewController.m; sourceTree = "<group>"; };
+		C4DB33BF1F273EFB0080D72F /* AddPhotoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddPhotoViewController.h; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/AddPhotoViewController.h; sourceTree = "<group>"; };
+		C4DB33C01F273EFB0080D72F /* AddPhotoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AddPhotoViewController.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SectionSetting/AddPhotoViewController.m; sourceTree = "<group>"; };
 		C4F1D0E91EF8F1B800A04B28 /* SocialTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SocialTableViewController.h; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SocialTableViewController.h; sourceTree = "<group>"; };
 		C4F1D0EA1EF8F1B800A04B28 /* SocialTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SocialTableViewController.m; path = ../../../../../fenix/XCode_Project/NIM_iOS_Demo_v3/NIMDemo/NIMDemo/SocialTableViewController.m; sourceTree = "<group>"; };
 		C4F1D0EC1EF8F2E800A04B28 /* SocialTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocialTableViewCell.h; sourceTree = "<group>"; };
@@ -1981,6 +2002,14 @@
 				C482C3501F1CC04800EF2B71 /* SettingSecurityViewController.m */,
 				C482C3521F1D9DF100EF2B71 /* ChangeMobileViewController.h */,
 				C482C3531F1D9DF100EF2B71 /* ChangeMobileViewController.m */,
+				C4DB33B31F25BFA70080D72F /* ChangePasswordViewController.h */,
+				C4DB33B41F25BFA70080D72F /* ChangePasswordViewController.m */,
+				C4DB33B61F25DA6F0080D72F /* PrivacyViewController.h */,
+				C4DB33B71F25DA6F0080D72F /* PrivacyViewController.m */,
+				C4DB33B91F25F7720080D72F /* FeedBackViewController.h */,
+				C4DB33BA1F25F7720080D72F /* FeedBackViewController.m */,
+				C4DB33BF1F273EFB0080D72F /* AddPhotoViewController.h */,
+				C4DB33C01F273EFB0080D72F /* AddPhotoViewController.m */,
 			);
 			name = SectionSetting;
 			sourceTree = "<group>";
@@ -2016,6 +2045,8 @@
 				C4DB33A81F2445AF0080D72F /* UserInfo.m */,
 				C4DB33AA1F245A910080D72F /* MyUserInfoViewController.h */,
 				C4DB33AB1F245A910080D72F /* MyUserInfoViewController.m */,
+				C4DB33BC1F2709240080D72F /* HobbyViewController.h */,
+				C4DB33BD1F2709240080D72F /* HobbyViewController.m */,
 			);
 			name = User;
 			sourceTree = "<group>";
@@ -2197,6 +2228,10 @@
 				C4F1D15C1F03DDCA00A04B28 /* SocialDetailTableViewCell.m */,
 				C4F1D15E1F03DDE500A04B28 /* SocialCommentDetailTableViewCell.h */,
 				C4F1D15F1F03DDE500A04B28 /* SocialCommentDetailTableViewCell.m */,
+				C4DB33AD1F25A61A0080D72F /* NearUserViewController.h */,
+				C4DB33AE1F25A61A0080D72F /* NearUserViewController.m */,
+				C4DB33B01F25A69F0080D72F /* NearUserTableViewCell.h */,
+				C4DB33B11F25A69F0080D72F /* NearUserTableViewCell.m */,
 			);
 			name = SectionSocial;
 			sourceTree = "<group>";
@@ -2440,6 +2475,7 @@
 				61518A4A1CA233390061C4A9 /* NTESNavigationAnimator.m in Sources */,
 				61E471301B7D963E00F4A1BF /* NTESCustomAttachmentDecoder.m in Sources */,
 				6195CD201A8C4D3C00F3E239 /* NSString+NTES.m in Sources */,
+				C4DB33BB1F25F7720080D72F /* FeedBackViewController.m in Sources */,
 				61E4712A1B7D963E00F4A1BF /* NTESLoginViewController.m in Sources */,
 				61E471111B7D963E00F4A1BF /* NTESCustomSysNotificationSender.m in Sources */,
 				C482C3261F135D0600EF2B71 /* GroupMenberCountTableViewCell.m in Sources */,
@@ -2465,6 +2501,7 @@
 				C4D4C9361ED7C37F00ADD7B7 /* TabBarController.m in Sources */,
 				6110D8B51C24009D00805BA4 /* UIScrollView+NTESPullToRefresh.m in Sources */,
 				61EAD9151B82FEE9005DC715 /* NTESPersonalCardViewController.m in Sources */,
+				C4DB33C11F273EFB0080D72F /* AddPhotoViewController.m in Sources */,
 				C4D8F12D1ED48657002F9F3A /* AFNetworkReachabilityManager.m in Sources */,
 				61A8EF341BB67F0900033FB8 /* UIResponder+NTESFirstResponder.m in Sources */,
 				C4F1D1531F03891700A04B28 /* SocialDetailViewController.m in Sources */,
@@ -2557,6 +2594,7 @@
 				612CACEE1BB1484C00C348B5 /* NTESContactDataMember.m in Sources */,
 				C482C3291F13652C00EF2B71 /* GroupMenberTableViewCell.m in Sources */,
 				61E471391B7D963E00F4A1BF /* NTESSearchMessageContentCell.m in Sources */,
+				C4DB33B51F25BFA70080D72F /* ChangePasswordViewController.m in Sources */,
 				6173AEC91BAAC6CB00854D49 /* NTESGenderSettingViewController.m in Sources */,
 				C4DB33931F1E25A30080D72F /* NSDataEx.m in Sources */,
 				C482C3101F0CAE7300EF2B71 /* TradeTopBarItem.m in Sources */,
@@ -2599,7 +2637,9 @@
 				61E4710C1B7D963E00F4A1BF /* NTESTeamListViewController.m in Sources */,
 				61E4718A1B7D96AA00F4A1BF /* NTESBundleSetting.m in Sources */,
 				AE2AA6851A7CD35C00CFF013 /* UIView+NTES.m in Sources */,
+				C4DB33B21F25A69F0080D72F /* NearUserTableViewCell.m in Sources */,
 				E45E177A1CA8CB6200C4ED69 /* NTESLogUploader.m in Sources */,
+				C4DB33B81F25DA6F0080D72F /* PrivacyViewController.m in Sources */,
 				61518A5A1CA234590061C4A9 /* NTESMainTabController.m in Sources */,
 				61EAD9181B833C4E005DC715 /* NTESBlackListViewController.m in Sources */,
 				612FA9551C1EC202008956C9 /* NTESChatroomMessageDataProvider.m in Sources */,
@@ -2627,6 +2667,7 @@
 				61E4713E1B7D963E00F4A1BF /* NTESSessionWhiteBoardContentView.m in Sources */,
 				C482C2F51F09DAA800EF2B71 /* TradePublishManager.m in Sources */,
 				6118F5A91C5A0FC1009AF01E /* UIView+Swizzling.m in Sources */,
+				C4DB33AF1F25A61A0080D72F /* NearUserViewController.m in Sources */,
 				6110D8A91C23E76D00805BA4 /* NTESChatroomMemberCell.m in Sources */,
 				E48988EB1DE42391001CF6C5 /* NTESSessionCustomContentConfig.m in Sources */,
 				61E471211B7D963E00F4A1BF /* NTESCustomSysNotificationViewController.m in Sources */,
@@ -2641,6 +2682,7 @@
 				E49D53C11B451C7400A869AC /* NSData+NTES.m in Sources */,
 				61EEE7761C22964500022315 /* NTESLiveMasterInfoView.m in Sources */,
 				C4F1D15D1F03DDCA00A04B28 /* SocialDetailTableViewCell.m in Sources */,
+				C4DB33BE1F2709240080D72F /* HobbyViewController.m in Sources */,
 				61EEE7731C22917400022315 /* NTESChatroomMemberListViewController.m in Sources */,
 				617D015D1AEDE03900C6DB77 /* UIImage+NTESColor.m in Sources */,
 				61EAD9081B82D0A2005DC715 /* NTESTextSettingCell.m in Sources */,

+ 482 - 33
NIMDemo/NIMDemo/Base.lproj/Main.storyboard

@@ -14,7 +14,7 @@
             <objects>
                 <navigationController storyboardIdentifier="NavController" id="ryW-gA-XNT" sceneMemberID="viewController">
                     <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
-                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="Hk7-II-cEF">
+                    <navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="Hk7-II-cEF">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
@@ -76,10 +76,6 @@
                                 <color key="textColor" red="0.80778062343597412" green="0.80787831544876099" blue="0.80774742364883423" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="35l-Ty-Mc8">
-                                <rect key="frame" x="103" y="118" width="168" height="128"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
-                            </imageView>
                             <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gTO-zI-B9g">
                                 <rect key="frame" x="35" y="409" width="305" height="50"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
@@ -91,6 +87,10 @@
                                     <segue destination="WOk-cZ-Myx" kind="show" id="Tha-4U-vsU"/>
                                 </connections>
                             </button>
+                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Logo180" translatesAutoresizingMaskIntoConstraints="NO" id="35l-Ty-Mc8">
+                                <rect key="frame" x="123" y="135" width="128" height="128"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                            </imageView>
                         </subviews>
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     </view>
@@ -219,21 +219,17 @@
         <scene sceneID="Ifc-QK-3eD">
             <objects>
                 <viewController id="LW2-NW-CF0" customClass="FriendViewController" sceneMemberID="viewController">
-                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="Rpl-MA-peY">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="873-I9-L0n"/>
+                        <viewControllerLayoutGuide type="bottom" id="rIm-E9-Qd1"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8W4-t7-6Vc">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="618"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                        <connections>
-                            <outlet property="dataSource" destination="LW2-NW-CF0" id="n2x-KZ-9KI"/>
-                            <outlet property="delegate" destination="LW2-NW-CF0" id="s0b-L7-ACc"/>
-                        </connections>
-                    </tableView>
-                    <extendedEdge key="edgesForExtendedLayout" top="YES"/>
+                    </view>
                     <tabBarItem key="tabBarItem" title="朋友" image="五个图标_19" selectedImage="五个图标_05" id="q7s-dK-zBU"/>
                     <simulatedTabBarMetrics key="simulatedBottomBarMetrics" translucent="NO"/>
-                    <connections>
-                        <outlet property="mTableView" destination="Rpl-MA-peY" id="BsQ-O1-5d0"/>
-                    </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="mCS-33-Zij" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
@@ -252,17 +248,16 @@
                             <rect key="frame" x="0.0" y="0.0" width="375" height="395"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                             <subviews>
-                                <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0AV-01-Xgc">
-                                    <rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
-                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
-                                    <color key="backgroundColor" red="0.9407036304473877" green="0.73566633462905884" blue="0.3176095187664032" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
-                                </view>
                                 <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="z5K-RR-U3D">
-                                    <rect key="frame" x="0.0" y="60" width="375" height="150"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="210"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                     <subviews>
+                                        <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HLd-DN-PZb">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="210"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                        </imageView>
                                         <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FcO-1y-2hx">
-                                            <rect key="frame" x="147" y="0.0" width="80" height="80"/>
+                                            <rect key="frame" x="147" y="61" width="80" height="80"/>
                                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                             <subviews>
                                                 <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Cov-zT-eoS">
@@ -278,14 +273,14 @@
                                             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                                         </view>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="前世情人" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XLf-WR-37C">
-                                            <rect key="frame" x="0.0" y="88" width="375" height="21"/>
+                                            <rect key="frame" x="0.0" y="149" width="375" height="21"/>
                                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                             <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                             <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                             <nil key="highlightedColor"/>
                                         </label>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="ID:45621548" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w19-Gn-s38">
-                                            <rect key="frame" x="0.0" y="108" width="375" height="21"/>
+                                            <rect key="frame" x="0.0" y="169" width="375" height="21"/>
                                             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                             <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
@@ -462,6 +457,7 @@
                         <outlet property="addressLabel" destination="7ZQ-ZD-WMX" id="wIP-4h-C7s"/>
                         <outlet property="ageLabel" destination="bI5-VG-3LN" id="cSk-uQ-atf"/>
                         <outlet property="avatarContainer" destination="Cov-zT-eoS" id="Xid-KP-pVJ"/>
+                        <outlet property="bannerImage" destination="HLd-DN-PZb" id="Fta-9J-PPB"/>
                         <outlet property="followBtn" destination="Hi0-PV-iqp" id="qTk-2Z-sja"/>
                         <outlet property="genderImage" destination="onX-VD-ZVE" id="sNb-Am-JNd"/>
                         <outlet property="giftBtn" destination="mAS-7k-NBD" id="ZrF-Vd-WSO"/>
@@ -866,6 +862,61 @@
             </objects>
             <point key="canvasLocation" x="2516" y="1854.4227886056974"/>
         </scene>
+        <!--Near User View Controller-->
+        <scene sceneID="Cyc-Nf-FRd">
+            <objects>
+                <tableViewController storyboardIdentifier="NearUser" id="nhN-sj-UwC" customClass="NearUserViewController" sceneMemberID="viewController">
+                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="9xO-rw-CF6">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <prototypes>
+                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="nearUser" selectionStyle="none" indentationWidth="10" reuseIdentifier="nearUser" id="ZKZ-j5-HEt" customClass="NearUserTableViewCell">
+                                <rect key="frame" x="0.0" y="28" width="375" height="44"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ZKZ-j5-HEt" id="sDB-hs-9ms">
+                                    <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                    <autoresizingMask key="autoresizingMask"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m2a-VB-nrB">
+                                            <rect key="frame" x="52" y="11" width="186" height="21"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                            <nil key="textColor"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ohc-3W-Sg5">
+                                            <rect key="frame" x="287" y="10" width="80" height="21"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                            <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="t1o-xt-I3j">
+                                            <rect key="frame" x="8" y="3" width="36" height="36"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                        </view>
+                                    </subviews>
+                                </tableViewCellContentView>
+                                <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                <connections>
+                                    <outlet property="avatarContainer" destination="t1o-xt-I3j" id="czE-vQ-BL2"/>
+                                    <outlet property="distanceLabel" destination="ohc-3W-Sg5" id="7Un-yD-S7F"/>
+                                    <outlet property="nickLabel" destination="m2a-VB-nrB" id="44q-Dh-jlR"/>
+                                </connections>
+                            </tableViewCell>
+                        </prototypes>
+                        <connections>
+                            <outlet property="dataSource" destination="nhN-sj-UwC" id="PNu-lJ-Ya8"/>
+                            <outlet property="delegate" destination="nhN-sj-UwC" id="KYi-Rt-Vk2"/>
+                        </connections>
+                    </tableView>
+                </tableViewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="6lJ-1e-pFS" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="3368.8000000000002" y="1853.5232383808097"/>
+        </scene>
         <!--My User Info View Controller-->
         <scene sceneID="Sfq-en-omq">
             <objects>
@@ -1310,7 +1361,7 @@
                 </tableViewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="rWK-uL-QYO" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="3305" y="2130"/>
+            <point key="canvasLocation" x="3305" y="2587"/>
         </scene>
         <!--Setting Security View Controller-->
         <scene sceneID="vwe-bZ-sVA">
@@ -1420,7 +1471,7 @@
                 </tableViewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="PQB-m4-ZDc" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="4110" y="2130"/>
+            <point key="canvasLocation" x="4121" y="2587"/>
         </scene>
         <!--Change Mobile View Controller-->
         <scene sceneID="juj-7c-mTu">
@@ -1543,7 +1594,403 @@
                 </tableViewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="KD1-sY-Yr1" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="4856.8000000000002" y="2129.6851574212897"/>
+            <point key="canvasLocation" x="4911" y="2587"/>
+        </scene>
+        <!--Change Password View Controller-->
+        <scene sceneID="0Xd-Yv-NQW">
+            <objects>
+                <tableViewController storyboardIdentifier="ChangePassword" id="jyl-Kw-LqS" customClass="ChangePasswordViewController" sceneMemberID="viewController">
+                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="IG3-z2-nrH">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
+                        <view key="tableHeaderView" contentMode="scaleToFill" id="jVS-ld-M6G">
+                            <rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        </view>
+                        <sections>
+                            <tableViewSection id="evy-uG-g7q">
+                                <cells>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="SNh-aq-916">
+                                        <rect key="frame" x="0.0" y="1" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="SNh-aq-916" id="YqX-JG-8NN">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="原密码:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Pre-hJ-lPk">
+                                                    <rect key="frame" x="8" y="11" width="70" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入8-12位原密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="5e4-AA-5V7">
+                                                    <rect key="frame" x="80" y="6" width="287" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                                    <nil key="textColor"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <textInputTraits key="textInputTraits"/>
+                                                </textField>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="wNh-u9-V2e">
+                                        <rect key="frame" x="0.0" y="45" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="wNh-u9-V2e" id="WE7-xj-LWe">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="新密码:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fwL-2k-8B3">
+                                                    <rect key="frame" x="8" y="11" width="70" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入8-12位新密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="8jl-fb-Fil">
+                                                    <rect key="frame" x="80" y="6" width="287" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                                    <nil key="textColor"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <textInputTraits key="textInputTraits"/>
+                                                </textField>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="Qe6-Cg-hGD">
+                                        <rect key="frame" x="0.0" y="89" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Qe6-Cg-hGD" id="FQo-1p-aZG">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="确认密码:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vLH-VD-sQ5">
+                                                    <rect key="frame" x="8" y="11" width="87" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入8-12位新密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3W4-CP-7qE">
+                                                    <rect key="frame" x="94" y="6" width="273" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                                    <nil key="textColor"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <textInputTraits key="textInputTraits"/>
+                                                </textField>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                    </tableViewCell>
+                                </cells>
+                            </tableViewSection>
+                        </sections>
+                        <connections>
+                            <outlet property="dataSource" destination="jyl-Kw-LqS" id="26z-g0-WVt"/>
+                            <outlet property="delegate" destination="jyl-Kw-LqS" id="FRD-xW-GEH"/>
+                        </connections>
+                    </tableView>
+                    <connections>
+                        <outlet property="changeLabel" destination="8jl-fb-Fil" id="hkA-x8-wVv"/>
+                        <outlet property="confirmLabel" destination="3W4-CP-7qE" id="7Kb-9U-fAe"/>
+                        <outlet property="originLabel" destination="5e4-AA-5V7" id="ioQ-et-UyO"/>
+                    </connections>
+                </tableViewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="WHx-Rz-AjV" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="5652" y="2586.6566716641682"/>
+        </scene>
+        <!--Privacy View Controller-->
+        <scene sceneID="KqK-9N-Afq">
+            <objects>
+                <tableViewController storyboardIdentifier="Privacy" id="QH9-gU-Wl7" customClass="PrivacyViewController" sceneMemberID="viewController">
+                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="1" sectionFooterHeight="10" id="NBg-g5-uvW">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
+                        <view key="tableHeaderView" contentMode="scaleToFill" id="BLy-bs-lcF">
+                            <rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        </view>
+                        <sections>
+                            <tableViewSection id="u1n-0Q-xVH">
+                                <cells>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="yjQ-cd-zUy">
+                                        <rect key="frame" x="0.0" y="1" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yjQ-cd-zUy" id="VZl-cj-tyk">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="加我为好友需要验证" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oQZ-aO-z7X">
+                                                    <rect key="frame" x="8" y="11" width="156" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PQ0-Bc-YHV">
+                                                    <rect key="frame" x="318" y="6" width="51" height="31"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                                    <connections>
+                                                        <action selector="verifyChanged:" destination="QH9-gU-Wl7" eventType="valueChanged" id="4RH-H9-27n"/>
+                                                    </connections>
+                                                </switch>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                    </tableViewCell>
+                                </cells>
+                            </tableViewSection>
+                            <tableViewSection id="3ze-2N-wtG">
+                                <cells>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="s2v-S7-c2r">
+                                        <rect key="frame" x="0.0" y="56" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="s2v-S7-c2r" id="edn-fl-ZxC">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="通过手机号找到我" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zvb-mm-PTY">
+                                                    <rect key="frame" x="8" y="11" width="139" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="B1W-at-Lbr">
+                                                    <rect key="frame" x="318" y="6" width="51" height="31"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                                    <connections>
+                                                        <action selector="findMobileChanged:" destination="QH9-gU-Wl7" eventType="valueChanged" id="bW8-sh-pNJ"/>
+                                                    </connections>
+                                                </switch>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="Z06-m2-fcL">
+                                        <rect key="frame" x="0.0" y="100" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Z06-m2-fcL" id="Cj2-mb-srv">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="通过谁说号找到我" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dvl-0I-wTA">
+                                                    <rect key="frame" x="8" y="11" width="139" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2GN-gE-Gxk">
+                                                    <rect key="frame" x="318" y="6" width="51" height="31"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                                    <connections>
+                                                        <action selector="findIdChanged:" destination="QH9-gU-Wl7" eventType="valueChanged" id="vEc-Bs-XDo"/>
+                                                    </connections>
+                                                </switch>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="jUp-tq-OQe">
+                                        <rect key="frame" x="0.0" y="144" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="jUp-tq-OQe" id="UHB-xU-f7L">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="通过会员名找到我" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PW7-Ek-fKd">
+                                                    <rect key="frame" x="8" y="11" width="139" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Kon-sy-dxC">
+                                                    <rect key="frame" x="318" y="6" width="51" height="31"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                                    <connections>
+                                                        <action selector="findNickChanged:" destination="QH9-gU-Wl7" eventType="valueChanged" id="SMU-6n-izG"/>
+                                                    </connections>
+                                                </switch>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                    </tableViewCell>
+                                </cells>
+                            </tableViewSection>
+                            <tableViewSection id="K2v-bT-eGL">
+                                <cells>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="JZw-ag-S0G">
+                                        <rect key="frame" x="0.0" y="199" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="JZw-ag-S0G" id="kjZ-FD-wek">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="允许陌生人查看我10条动态" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oUK-4g-eXp">
+                                                    <rect key="frame" x="8" y="11" width="209" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gOK-3n-j0j">
+                                                    <rect key="frame" x="318" y="6" width="51" height="31"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                                    <connections>
+                                                        <action selector="seeSocialChanged:" destination="QH9-gU-Wl7" eventType="valueChanged" id="Sm2-Gy-6Ty"/>
+                                                    </connections>
+                                                </switch>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                    </tableViewCell>
+                                </cells>
+                            </tableViewSection>
+                            <tableViewSection id="2hi-Jt-Tju">
+                                <cells>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="pL3-dW-8en">
+                                        <rect key="frame" x="0.0" y="254" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="pL3-dW-8en" id="QtQ-fo-NeL">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="特效开关" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gPu-7s-cwW">
+                                                    <rect key="frame" x="8" y="11" width="70" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zke-xg-FcW">
+                                                    <rect key="frame" x="318" y="6" width="51" height="31"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
+                                                    <connections>
+                                                        <action selector="effectChanged:" destination="QH9-gU-Wl7" eventType="valueChanged" id="QPN-zM-mzd"/>
+                                                    </connections>
+                                                </switch>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                    </tableViewCell>
+                                </cells>
+                            </tableViewSection>
+                            <tableViewSection id="FnT-RJ-sPY">
+                                <cells>
+                                    <tableViewCell clipsSubviews="YES" tag="1" contentMode="scaleToFill" selectionStyle="none" accessoryType="disclosureIndicator" indentationWidth="10" id="QaE-YP-CKX">
+                                        <rect key="frame" x="0.0" y="309" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="QaE-YP-CKX" id="qkL-N8-YZ4">
+                                            <rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="黑名单" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oCX-9G-Bsi">
+                                                    <rect key="frame" x="8" y="11" width="52" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                        <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                    </tableViewCell>
+                                </cells>
+                            </tableViewSection>
+                        </sections>
+                        <connections>
+                            <outlet property="dataSource" destination="QH9-gU-Wl7" id="0BW-O2-wY4"/>
+                            <outlet property="delegate" destination="QH9-gU-Wl7" id="VZc-G7-NIt"/>
+                        </connections>
+                    </tableView>
+                    <connections>
+                        <outlet property="effectSwitch" destination="Zke-xg-FcW" id="Yam-x8-y7R"/>
+                        <outlet property="findIdSwitch" destination="2GN-gE-Gxk" id="fgH-Nz-GGV"/>
+                        <outlet property="findMobileSwitch" destination="B1W-at-Lbr" id="Mpu-jt-kQZ"/>
+                        <outlet property="findNickSwitch" destination="Kon-sy-dxC" id="Jcx-HW-0RX"/>
+                        <outlet property="seeSocialSwitch" destination="gOK-3n-j0j" id="iSd-hb-ylI"/>
+                        <outlet property="verifySwitch" destination="PQ0-Bc-YHV" id="EVH-Lf-6lI"/>
+                    </connections>
+                </tableViewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="JqA-IU-oyu" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="6445.6000000000004" y="2586.6566716641682"/>
+        </scene>
+        <!--Feed Back View Controller-->
+        <scene sceneID="Szo-MR-oci">
+            <objects>
+                <viewController storyboardIdentifier="FeedBack" id="1yB-QS-pAW" customClass="FeedBackViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="PeM-oL-3SA"/>
+                        <viewControllerLayoutGuide type="bottom" id="FWL-Of-htX"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="jbt-y9-TGc">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="s99-Jq-YLN">
+                                <rect key="frame" x="0.0" y="0.0" width="375" height="180"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="请描述你的问题" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="btT-nH-7Sm">
+                                        <rect key="frame" x="5" y="5" width="183" height="28"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="300" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PnF-uR-57Y">
+                                        <rect key="frame" x="185" y="156" width="183" height="28"/>
+                                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="eCI-cs-4y9">
+                                        <rect key="frame" x="0.0" y="0.0" width="375" height="180"/>
+                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                                        <connections>
+                                            <outlet property="delegate" destination="1yB-QS-pAW" id="LtS-rH-7eC"/>
+                                        </connections>
+                                    </textView>
+                                </subviews>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            </view>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="io1-Gp-Xgq">
+                                <rect key="frame" x="10" y="190" width="60" height="60"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" backgroundImage="帮助与反馈_03"/>
+                                <connections>
+                                    <action selector="onTouchAddPic:" destination="1yB-QS-pAW" eventType="touchUpInside" id="AQd-D8-c3e"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                        <color key="backgroundColor" red="0.95575827776487821" green="0.95453345959214653" blue="0.97592798223350252" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
+                    </view>
+                    <extendedEdge key="edgesForExtendedLayout"/>
+                    <connections>
+                        <outlet property="addPicBtn" destination="io1-Gp-Xgq" id="IUR-zB-vk4"/>
+                        <outlet property="msgTextField" destination="eCI-cs-4y9" id="Xrs-x2-R5N"/>
+                        <outlet property="placeHolderLabel" destination="btT-nH-7Sm" id="Nkv-IG-RjE"/>
+                        <outlet property="textCountLabel" destination="PnF-uR-57Y" id="AFe-14-Hf2"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="5dq-Mt-0tL" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="7234" y="2587"/>
         </scene>
         <!--组群-->
         <scene sceneID="xUq-cg-xDw">
@@ -1697,11 +2144,11 @@
                         <viewControllerLayoutGuide type="bottom" id="mtU-Zy-ar1"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="KfJ-My-GKX">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="618"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <pickerView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4zt-pf-brs" customClass="PSCityPickerView">
-                                <rect key="frame" x="0.0" y="64" width="375" height="603"/>
+                                <rect key="frame" x="0.0" y="64" width="375" height="554"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             </pickerView>
                         </subviews>
@@ -1914,7 +2361,7 @@
             <objects>
                 <tableViewController storyboardIdentifier="GroupMore" id="Pzn-rE-rHS" customClass="GroupMoreTableViewController" sceneMemberID="viewController">
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="80" sectionHeaderHeight="28" sectionFooterHeight="28" id="cp8-AT-t8S">
-                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="618"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
@@ -2027,6 +2474,7 @@
         </scene>
     </scenes>
     <resources>
+        <image name="Logo180" width="180" height="180"/>
         <image name="五个图标_03" width="25" height="25"/>
         <image name="五个图标_05" width="25" height="25"/>
         <image name="五个图标_07" width="25" height="25"/>
@@ -2038,6 +2486,7 @@
         <image name="五个图标_21" width="25" height="25"/>
         <image name="五个图标_22" width="25" height="25"/>
         <image name="创建群_05" width="50" height="50"/>
+        <image name="帮助与反馈_03" width="68" height="68"/>
         <image name="开启通讯录_07" width="333" height="45"/>
         <image name="登录界面_03" width="632" height="90"/>
         <image name="登录界面_06" width="632" height="90"/>
@@ -2049,9 +2498,9 @@
         <image name="选择群组_13" width="20" height="20"/>
     </resources>
     <inferredMetricsTieBreakers>
-        <segue reference="3R5-Pr-2W2"/>
         <segue reference="Tha-4U-vsU"/>
-        <segue reference="L8f-9a-f45"/>
-        <segue reference="gKG-Mt-Dsc"/>
+        <segue reference="3R5-Pr-2W2"/>
+        <segue reference="1Zu-Wn-MWT"/>
+        <segue reference="crz-lb-2c2"/>
     </inferredMetricsTieBreakers>
 </document>

+ 7 - 6
NIMDemo/NIMDemo/Classes/Sections/Contact/ViewController/Contact/NTESBlackListViewController.m

@@ -47,12 +47,13 @@
 
 - (void)setUpNavItem{
     self.navigationItem.title = @"黑名单";
-    UIButton *teamBtn = [UIButton buttonWithType:UIButtonTypeCustom];
-    [teamBtn addTarget:self action:@selector(onOpera:) forControlEvents:UIControlEventTouchUpInside];
-    [teamBtn setImage:[UIImage imageNamed:@"icon_tinfo_normal"] forState:UIControlStateNormal];
-    [teamBtn setImage:[UIImage imageNamed:@"icon_tinfo_pressed"] forState:UIControlStateHighlighted];
-    [teamBtn sizeToFit];
-    UIBarButtonItem *teamItem = [[UIBarButtonItem alloc] initWithCustomView:teamBtn];
+//    UIButton *teamBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+//    [teamBtn addTarget:self action:@selector(onOpera:) forControlEvents:UIControlEventTouchUpInside];
+//    [teamBtn setImage:[UIImage imageNamed:@"icon_tinfo_normal"] forState:UIControlStateNormal];
+//    [teamBtn setImage:[UIImage imageNamed:@"icon_tinfo_pressed"] forState:UIControlStateHighlighted];
+//    [teamBtn sizeToFit];
+//    UIBarButtonItem *teamItem = [[UIBarButtonItem alloc] initWithCustomView:teamBtn];
+    UIBarButtonItem *teamItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(onOpera:)];
     self.navigationItem.rightBarButtonItem = teamItem;
 }
 

+ 5 - 2
NIMDemo/NIMDemo/Classes/Util/NTESSessionUtil.m

@@ -370,14 +370,17 @@ static NSString *const NTESRecentSessionAtMark = @"NTESRecentSessionAtMark";
             default:
             {
                 NSString *clientName = [self resolveOnlineClientName:client];
-                state = [NSString stringWithFormat:@"%@在线",clientName];
+//                state = [NSString stringWithFormat:@"%@在线",clientName];
+                state = [NSString stringWithFormat:@"%@",clientName];
+
                 break;
             }
         }
     }
     else
     {
-        state = [userId isEqualToString:[NIMSDK sharedSDK].loginManager.currentAccount]? @"" : @"离线";
+//        state = [userId isEqualToString:[NIMSDK sharedSDK].loginManager.currentAccount]? @"" : @"离线";
+        state = [userId isEqualToString:[NIMSDK sharedSDK].loginManager.currentAccount]? @"" : @"";
     }
     return state;
 }

+ 6 - 5
NIMDemo/NIMDemo/FriendViewController.m

@@ -22,6 +22,7 @@
 #import "NTESPersonalCardViewController.h"
 #import "NTESContactViewController.h"
 #import "NTESContactAddFriendViewController.h"
+#import "User.h"
 
 #define SessionListTitle @"谁说"
 
@@ -35,8 +36,6 @@
 
 @property (nonatomic,strong) NSMutableDictionary *previews;
 
-@property (strong, nonatomic) IBOutlet UITableView *mTableView;
-
 @end
 
 @implementation FriendViewController
@@ -60,7 +59,6 @@
     
     self.view.backgroundColor = UIColor.whiteColor;
     
-    self.tableView = self.mTableView;
     self.supportsForceTouch = [self.traitCollection respondsToSelector:@selector(forceTouchCapability)] && self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable;
     
     [[NIMSDK sharedSDK].loginManager addDelegate:self];
@@ -124,8 +122,11 @@
 - (void)onSelectedAvatar:(NIMRecentSession *)recent
              atIndexPath:(NSIndexPath *)indexPath{
     if (recent.session.sessionType == NIMSessionTypeP2P) {
-        NTESPersonalCardViewController *vc = [[NTESPersonalCardViewController alloc] initWithUserId:recent.session.sessionId];
-        [self.navigationController pushViewController:vc animated:YES];
+        [User showUserInfo:recent.session.sessionId viewController:self];
+    }
+    else
+    {
+        [User showTeamInfo:recent.session.sessionId viewController:self];
     }
 }
 

+ 13 - 0
NIMDemo/NIMDemo/HobbyViewController.h

@@ -0,0 +1,13 @@
+//
+//  HobbyViewController.h
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/25.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface HobbyViewController : UIViewController
+
+@end

+ 164 - 0
NIMDemo/NIMDemo/HobbyViewController.m

@@ -0,0 +1,164 @@
+//
+//  HobbyViewController.m
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/25.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import "HobbyViewController.h"
+#import "HttpRequest.h"
+#import "UIView+NTES.h"
+#import "UIView+Toast.h"
+#import "User.h"
+
+@interface HobbyViewController ()
+
+@property (nonatomic, strong) NSMutableArray<UIButton *>        *hobbyBtnArr;
+
+@end
+
+@implementation HobbyViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    self.view.backgroundColor = UIColor.groupTableViewBackgroundColor;
+    
+    __weak typeof(self) wself = self;
+    [[HttpRequest shared] hobbyList:^(NSMutableDictionary * _Nullable dict) {
+        [wself setUpComponent:dict];
+    } failure:^{
+        [wself.view makeToast:@"获取列表失败" duration:2.0 position:CSToastPositionCenter];
+    }];
+    
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)viewWillAppear:(BOOL)animated{
+    [super viewWillAppear:animated];
+    
+    [self.navigationItem setTitle:@"兴趣爱好"];
+    
+    UIButton *doneBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+    [doneBtn setTitle:@"保存" forState:UIControlStateNormal];
+    [doneBtn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
+    [doneBtn addTarget:self action:@selector(onTouchDone:) forControlEvents:UIControlEventTouchUpInside];
+    [doneBtn sizeToFit];
+    
+    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithCustomView:doneBtn];
+    
+    [self.navigationItem setRightBarButtonItems:@[rightItem]];
+}
+
+- (void)setUpComponent:(NSMutableDictionary *)dict{
+    
+    float space = 10;
+    int columns = 3;
+    
+    float topBarHeight = [[UIApplication sharedApplication] statusBarFrame].size.height + self.navigationController.navigationBar.frame.size.height;
+    
+    UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, self.view.height)];
+    [scrollView setContentInset:UIEdgeInsetsMake(topBarHeight, 0, 0, 0)];
+    [self.view addSubview:scrollView];
+    
+    float startY = space;
+    float itemHeight = 30;
+    float sortWidth = scrollView.width - space * 2;
+    float hobbyWidth = (sortWidth - space * (columns - 1)) / columns;
+    
+    _hobbyBtnArr = [[NSMutableArray alloc] init];
+    
+    for(int i=0; i<dict.allKeys.count; i++)
+    {
+        NSString *key = [dict.allKeys objectAtIndex:i];
+        NSMutableArray *hobbys = [dict objectForKey:key];
+        
+        UILabel *sortLabel = [[UILabel alloc] initWithFrame:CGRectMake(space, startY, sortWidth, itemHeight)];
+        [sortLabel setTextColor:UIColor.lightGrayColor];
+        sortLabel.font = [UIFont systemFontOfSize:15];
+        sortLabel.text = key;
+        [scrollView addSubview:sortLabel];
+        
+        startY += sortLabel.height;
+        
+        for(int j=0; j<hobbys.count; j++)
+        {
+            NSString *hobby = [hobbys objectAtIndex:j];
+            float x = (j % columns) * (hobbyWidth + space) + space;
+            float y = startY + (j / columns) * (itemHeight + space);
+            UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(x, y, hobbyWidth, itemHeight)];
+            [btn setTitle:hobby forState:UIControlStateNormal];
+            btn.layer.cornerRadius = 15;
+            [btn addTarget:self action:@selector(onTouchHobbyBtn:) forControlEvents:UIControlEventTouchUpInside];
+            [scrollView addSubview:btn];
+            
+            BOOL selected = [[User sharedInfo].userInfo.hobbyDict objectForKey:hobby] ? YES : NO;
+            [self toggleHobbyBtn:btn toggle:selected];
+            
+            [_hobbyBtnArr addObject:btn];
+        }
+        
+        startY += ceilf((float)hobbys.count / (float)columns) * (itemHeight + space) + space;
+    }
+    
+    [scrollView setContentSize:CGSizeMake(scrollView.width, startY)];
+    
+}
+
+- (void)onTouchHobbyBtn:(id)sender{
+    
+    UIButton *btn = (UIButton *)sender;
+    [self toggleHobbyBtn:sender toggle:(btn.tag > 0 ? NO : YES)];
+    
+}
+
+- (void)toggleHobbyBtn:(UIButton *)btn toggle:(BOOL)toggle{
+    
+    if(toggle)
+    {
+        [btn setBackgroundColor:User.orangeColor];
+        [btn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
+        btn.tag = 1;
+    }
+    else
+    {
+        [btn setBackgroundColor:UIColor.whiteColor];
+        [btn setTitleColor:UIColor.grayColor forState:UIControlStateNormal];
+        btn.tag = 0;
+    }
+}
+
+- (void)onTouchDone:(id)sender{
+    
+    NSMutableArray *hobbyArr = [[NSMutableArray alloc] init];
+    for(int i=0; i<_hobbyBtnArr.count; i++)
+    {
+        UIButton *btn = [_hobbyBtnArr objectAtIndex:i];
+        if(btn.tag > 0)
+        {
+            [hobbyArr addObject:btn.currentTitle];
+        }
+    }
+
+    NSString *hobbys = [hobbyArr componentsJoinedByString:@","];
+    NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
+    [dict setValue:hobbys forKey:@"hobby"];
+    
+    __weak typeof(self) wself = self;
+    [[HttpRequest shared] updateUserInfo:dict success:^{
+        [wself.view makeToast:@"保存成功" duration:2.0 position:CSToastPositionCenter];
+        [[User sharedInfo].userInfo updateHobby:hobbys];
+    } failure:^{
+        [wself.view makeToast:@"保存失败" duration:2.0 position:CSToastPositionCenter];
+    }];
+    
+}
+
+
+@end

+ 25 - 0
NIMDemo/NIMDemo/HttpRequest/HttpRequest.h

@@ -89,6 +89,18 @@
                success:(void (^_Nullable)())success
                failure:(void (^_Nullable)())failure;
 
+- (void)uploadSocialBanner:(UIImage *_Nullable)image
+                   success:(void (^_Nullable)(NSString * _Nullable imgURL))success
+                   failure:(void (^_Nullable)())failure;
+
+- (void)nearUsers:(int)page
+          success:(void (^_Nullable)(NSMutableArray * _Nullable list))success
+          failure:(void (^_Nullable)())failure;
+
+- (void)uploadPhoto:(UIImage *_Nullable)image
+            success:(void (^_Nullable)(NSMutableDictionary * _Nullable photoData))success
+            failure:(void (^_Nullable)())failure;
+
 
 //trade
 - (void)tradePublish:(NSString *_Nullable)msg
@@ -140,4 +152,17 @@
              success:(void (^_Nullable)())success
              failure:(void (^_Nullable)())failure;
 
+- (void)changePassword:(NSString *_Nullable)pwd
+             changePwd:(NSString *_Nullable)changePwd
+               success:(void (^_Nullable)())success
+               failure:(void (^_Nullable)())failure;
+
+- (void)feedBacck:(NSString *_Nullable)msg
+            image:(UIImage *_Nullable)image
+          success:(void (^_Nullable)())success
+          failure:(void (^_Nullable)())failure;
+
+- (void)hobbyList:(void (^_Nullable)(NSMutableDictionary * _Nullable dict))success
+          failure:(void (^_Nullable)())failure;
+
 @end

+ 256 - 8
NIMDemo/NIMDemo/HttpRequest/HttpRequest.m

@@ -38,6 +38,9 @@
 @property (nonatomic, strong) NSString *urlUserInfo;
 @property (nonatomic, strong) NSString *urlUpdateUserInfo;
 @property (nonatomic, strong) NSString *urlUpdateNick;
+@property (nonatomic, strong) NSString *urlUploadSocialBanner;
+@property (nonatomic, strong) NSString *urlNearUser;
+@property (nonatomic, strong) NSString *urlPhotoUpload;
 
 //trade
 @property (nonatomic, strong) NSString *urlTradePublish;
@@ -52,6 +55,9 @@
 //setting
 @property (nonatomic, strong) NSString *urlSendCode;
 @property (nonatomic, strong) NSString *urlChangeMobile;
+@property (nonatomic, strong) NSString *urlChangePassword;
+@property (nonatomic, strong) NSString *urlFeedBack;
+@property (nonatomic, strong) NSString *urlHobbyList;
 
 
 @end
@@ -93,6 +99,9 @@
         self.urlUserInfo = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=social&a=get_user"];
         self.urlUpdateNick = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=social&a=update_nick"];
         self.urlUpdateUserInfo = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=social&a=update_info"];
+        self.urlUploadSocialBanner = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=social&a=banner_upload"];
+        self.urlNearUser = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=index&a=near_user"];
+        self.urlPhotoUpload = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=social&a=photo_upload"];
         
         
         self.urlTradePublish = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=trade&a=publish"];
@@ -107,6 +116,9 @@
         
         self.urlSendCode = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=index&a=send_code"];
         self.urlChangeMobile = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=index&a=change_mobile"];
+        self.urlChangePassword = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=index&a=pwd_update"];
+        self.urlFeedBack = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=feedback&a=report"];
+        self.urlHobbyList = [NSString stringWithFormat:@"%@%@", self.urlRoot, @"index.php?m=who&c=index&a=hobby_list"];
     }
     return self;
 }
@@ -182,6 +194,84 @@
 
 
 
+- (void)uploadImage:(NSString *)URLString
+              image:(UIImage *)image
+         parameters:(id)parameters
+           progress:(void (^)(NSProgress * _Nonnull))uploadProgress
+            success:(void (^)(id _Nullable))success
+            failure:(void (^)())failure
+{
+    if(!image)
+    {
+        [self request:URLString parameters:parameters progress:uploadProgress success:success failure:failure];
+        return;
+    }
+    
+    
+    //请求的managers
+    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
+    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
+    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json",@"text/json", @"text/html", nil];
+    
+    //请求的方式:POST
+    
+    NSLog(@"请求地址 %@", URLString);
+    NSLog(@"请求参数 %@", parameters);
+    
+    [manager POST:URLString parameters:parameters constructingBodyWithBlock:^(id<AFMultipartFormData>  _Nonnull formData) {
+        
+        NSData *data = UIImageJPEGRepresentation(image, 1);
+        [formData appendPartWithFileData:data name:@"upload" fileName:@"banner.jpg" mimeType:@"image/jpg"];
+        
+    } progress:uploadProgress success:^(NSURLSessionDataTask *task, id responseObject) {
+        
+        NSString *string = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
+        NSLog(@"请求成功,服务器返回的信息%@", string);
+        
+        NSError* error = nil;
+        NSData *strData = [string dataUsingEncoding:NSASCIIStringEncoding];
+        NSDictionary * dic = [NSJSONSerialization JSONObjectWithData:strData
+                                                             options:NSJSONReadingAllowFragments
+                                                               error:&error];
+        
+        NSString *errorInfo = nil;
+        
+        if (dic != nil && error == nil){
+            int code = [[dic valueForKey:@"c"] intValue];
+            if(code == 0)
+            {
+                NSDictionary *data = (NSDictionary *)[dic objectForKey:@"d"];
+                if(success)
+                    success(data);
+            }
+            else
+            {
+                errorInfo = [dic objectForKey:@"d"];
+            }
+        }else{
+            errorInfo = error.description;
+        }
+        
+        if(errorInfo)
+        {
+            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:errorInfo delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
+            [alert showAlertWithCompletionHandler:^(NSInteger index) {
+                if(failure)
+                    failure();
+            }];
+        }
+        
+    } failure:^(NSURLSessionDataTask *task, NSError * error) {
+        NSLog(@"请求失败,服务器返回的错误信息%@", error);
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:error.description delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
+        [alert showAlertWithCompletionHandler:^(NSInteger index) {
+            if(failure)
+                failure();
+        }];
+    }];
+    
+}
+
 
 
 
@@ -348,6 +438,9 @@
 {
     __weak User *user = [User sharedInfo];
     
+//    user.latitude = 37.437656;
+//    user.longitude = 112.541467;
+    
     NSDictionary *parameters = @{@"id":[NSString stringWithFormat:@"%d", user.userId],
                                  @"longitude":[NSString stringWithFormat:@"%F", user.longitude],
                                  @"latitude":[NSString stringWithFormat:@"%F", user.latitude]
@@ -646,6 +739,81 @@
 }
 
 
+- (void)uploadSocialBanner:(UIImage *_Nullable)image
+                   success:(void (^_Nullable)(NSString * _Nullable imgURL))success
+                   failure:(void (^_Nullable)())failure{
+    
+    NSString *userId = [NSString stringWithFormat:@"%d", [User sharedInfo].userId];
+    NSDictionary *dict = @{@"user_id":userId};
+    
+    [self uploadImage:_urlUploadSocialBanner image:image parameters:dict progress:nil success:^(id jsonData) {
+        
+        NSString *imgURL = [jsonData objectForKey:@"social_banner"];
+        
+        if(success)
+            success(imgURL);
+        
+    } failure:^{
+        
+        if(failure)
+            failure();
+    }];
+}
+
+
+- (void)nearUsers:(int)page
+          success:(void (^_Nullable)(NSMutableArray * _Nullable list))success
+          failure:(void (^_Nullable)())failure{
+    
+    NSString *userId = [NSString stringWithFormat:@"%d", [User sharedInfo].userId];
+    NSDictionary *dict = @{@"user_id":userId, @"page":@(page)};
+    
+    [self request:_urlNearUser parameters:dict progress:nil success:^(id jsonData) {
+        
+        NSMutableArray *list = [jsonData objectForKey:@"list"];
+        
+        NSMutableArray *userIds = [[NSMutableArray alloc] init];
+        
+        for(int i=0; i<list.count; i++)
+        {
+            NSDictionary *json = [list objectAtIndex:i];
+            NSString *userId = [json objectForKey:@"id"];
+            [userIds addObject:userId];
+        }
+        
+        [[NIMSDK sharedSDK].userManager fetchUserInfos:userIds completion:^(NSArray<NIMUser *> * _Nullable users, NSError * _Nullable error) {
+            if(success)
+                success(list);
+        }];
+        
+    } failure:^{
+        
+        if(failure)
+            failure();
+    }];
+    
+}
+
+- (void)uploadPhoto:(UIImage *_Nullable)image
+            success:(void (^_Nullable)(NSMutableDictionary * _Nullable photoData))success
+            failure:(void (^_Nullable)())failure{
+    
+    NSString *userId = [NSString stringWithFormat:@"%d", [User sharedInfo].userId];
+    NSDictionary *dict = @{@"user_id":userId};
+    
+    [self uploadImage:_urlPhotoUpload image:image parameters:dict progress:nil success:^(id jsonData) {
+        
+        if(success)
+            success(jsonData);
+        
+    } failure:^{
+        if(failure)
+            failure();
+    }];
+    
+}
+
+
 //trade
 - (void)tradePublish:(NSString *)msg
               picArr:(NSMutableArray *)picArr
@@ -656,18 +824,13 @@
              failure:(void (^_Nullable)())failure{
     
     User *user = [User sharedInfo];
-    
     NSString *userId = [NSString stringWithFormat:@"%d", user.userId];
-    NSString *roomId = user.currentChatRoomId ? user.currentChatRoomId : @"";
     
     NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init];
     [parameters setValue:userId forKey:@"user_id"];
-    [parameters setValue:[NSString stringWithFormat:@"%d", type] forKey:@"type"];
-    [parameters setValue:msg forKey:@"msg"];
-    [parameters setValue:picArr forKey:@"pic"];
-    [parameters setValue:[NSString stringWithFormat:@"%d", priority] forKey:@"priority"];
-    [parameters setValue:[NSString stringWithFormat:@"%d", priorityType] forKey:@"priority_type"];
-    [parameters setObject:roomId forKey:@"room_id"];
+    
+    
+
     
     [self request:_urlTradePublish parameters:parameters progress:nil success:^(id jsonData) {
         
@@ -975,4 +1138,89 @@
     
 }
 
+
+- (void)changePassword:(NSString *_Nullable)pwd
+             changePwd:(NSString *_Nullable)changePwd
+               success:(void (^_Nullable)())success
+               failure:(void (^_Nullable)())failure{
+    
+    User *user = [User sharedInfo];
+    
+    NSString *userId = [NSString stringWithFormat:@"%d", user.userId];
+    
+    NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init];
+    [parameters setValue:userId forKey:@"user_id"];
+    [parameters setValue:pwd forKey:@"pwd"];
+    [parameters setValue:changePwd forKey:@"new_pwd"];
+    
+    [self request:_urlChangePassword parameters:parameters progress:nil success:^(id jsonData) {
+    
+        NSString *update = [jsonData objectForKey:@"update"];
+        
+        if(update)
+        {
+            NSString *token = [jsonData objectForKey:@"token"];
+            
+            LoginData *sdkData = [NTESLoginManager sharedManager].currentLoginData;
+            sdkData.token     = token;
+            [[NTESLoginManager sharedManager] setCurrentLoginData:sdkData];
+            if(success)
+                success();
+        }
+        else
+        {
+            if(failure)
+                failure();
+        }
+        
+    } failure:^{
+        
+        if(failure)
+            failure();
+        
+    }];
+    
+}
+
+
+- (void)feedBacck:(NSString *_Nullable)msg
+            image:(UIImage *_Nullable)image
+          success:(void (^_Nullable)())success
+          failure:(void (^_Nullable)())failure{
+    
+    User *user = [User sharedInfo];
+    
+    NSString *userId = [NSString stringWithFormat:@"%d", user.userId];
+    
+    NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init];
+    [parameters setValue:userId forKey:@"user_id"];
+    [parameters setValue:msg forKey:@"msg"];
+    
+    [self uploadImage:_urlFeedBack image:image parameters:parameters progress:nil success:^(id jsonData) {
+        if(success)
+            success();
+    } failure:^{
+        if(failure)
+            failure();
+    }];
+}
+
+
+- (void)hobbyList:(void (^_Nullable)(NSMutableDictionary * _Nullable dict))success
+          failure:(void (^_Nullable)())failure{
+    
+    NSDictionary *parameters = @{};
+    [self request:_urlHobbyList parameters:parameters progress:nil
+        success:^(id jsonData) {
+        
+            if(success)
+                success(jsonData);
+            
+    } failure:^{
+        if(failure)
+            failure();
+    }];
+    
+}
+
 @end

二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/120x120-1.png


二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/120x120.png


二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/180x180.png


二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/58x58.png


二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/80x80.png


二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/87x87.png


+ 6 - 6
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Contents.json

@@ -13,37 +13,37 @@
     {
       "size" : "29x29",
       "idiom" : "iphone",
-      "filename" : "58x58.png",
+      "filename" : "Logo58.png",
       "scale" : "2x"
     },
     {
       "size" : "29x29",
       "idiom" : "iphone",
-      "filename" : "87x87.png",
+      "filename" : "Logo80-1.png",
       "scale" : "3x"
     },
     {
       "size" : "40x40",
       "idiom" : "iphone",
-      "filename" : "80x80.png",
+      "filename" : "Logo80.png",
       "scale" : "2x"
     },
     {
       "size" : "40x40",
       "idiom" : "iphone",
-      "filename" : "120x120.png",
+      "filename" : "Logo120-1.png",
       "scale" : "3x"
     },
     {
       "size" : "60x60",
       "idiom" : "iphone",
-      "filename" : "120x120-1.png",
+      "filename" : "Logo120.png",
       "scale" : "2x"
     },
     {
       "size" : "60x60",
       "idiom" : "iphone",
-      "filename" : "180x180.png",
+      "filename" : "Logo180.png",
       "scale" : "3x"
     }
   ],

二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo120-1.png


二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo120.png


二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo180.png


二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo58.png


二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo80-1.png


二進制
NIMDemo/NIMDemo/Images.xcassets/AppIcon.appiconset/Logo80.png


+ 21 - 0
NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo120.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "Logo120.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

二進制
NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo120.imageset/Logo120.png


+ 21 - 0
NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo180.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "Logo180.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

二進制
NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo180.imageset/Logo180.png


+ 21 - 0
NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo58.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "Logo58.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

二進制
NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo58.imageset/Logo58.png


+ 21 - 0
NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo80.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "Logo80.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

二進制
NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo80.imageset/Logo80.png


+ 21 - 0
NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo87.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "Logo87.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

二進制
NIMDemo/NIMDemo/Images.xcassets/Whosay/Logo87.imageset/Logo87.png


+ 18 - 2
NIMDemo/NIMDemo/MyUserInfoViewController.m

@@ -17,6 +17,7 @@
 #import "SDWebImageManager.h"
 #import "UIImage+NTES.h"
 #import "HttpRequest.h"
+#import "HobbyViewController.h"
 
 @interface MyUserInfoViewController ()<UINavigationControllerDelegate, UIImagePickerControllerDelegate>
 
@@ -55,8 +56,12 @@
 
 - (void)viewWillAppear:(BOOL)animated{
     [super viewWillAppear:animated];
-    
     [self.navigationItem setTitle:@"设置"];
+    
+    if(_userInfo)
+    {
+        [self fillInfo];
+    }
 }
 
 - (void)fillInfo{
@@ -106,6 +111,16 @@
     else
         _ageLabel.text = @"未知";
     
+    NSString *hobby = [User sharedInfo].userInfo.hobbyStr;
+    if(hobby && hobby.length > 0)
+    {
+        _hobbyLabel.text = hobby;
+    }
+    else
+    {
+        _hobbyLabel.text = @"";
+    }
+    
     if(_userInfo.realName && _userInfo.realName.length > 0)
         _realNameLabel.text = _userInfo.realName;
     else
@@ -296,7 +311,8 @@
 }
 
 - (void)handleHobby{
-    
+    HobbyViewController *vc = [[HobbyViewController alloc] init];
+    [self.navigationController pushViewController:vc animated:YES];
 }
 
 - (void)handleRealName{

+ 15 - 0
NIMDemo/NIMDemo/NearUserTableViewCell.h

@@ -0,0 +1,15 @@
+//
+//  NearUserTableViewCell.h
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/24.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface NearUserTableViewCell : UITableViewCell
+
+- (void)setUser:(NSString *)userId distance:(int)distance;
+
+@end

+ 54 - 0
NIMDemo/NIMDemo/NearUserTableViewCell.m

@@ -0,0 +1,54 @@
+//
+//  NearUserTableViewCell.m
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/24.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import "NearUserTableViewCell.h"
+#import "NIMAvatarImageView.h"
+#import "UIView+NTES.h"
+#import "UIImageView+WebCache.h"
+#import "User.h"
+
+@interface NearUserTableViewCell()
+@property (weak, nonatomic) IBOutlet UIView *avatarContainer;
+@property (strong, nonatomic) NIMAvatarImageView *avatar;
+@property (weak, nonatomic) IBOutlet UILabel *nickLabel;
+@property (weak, nonatomic) IBOutlet UILabel *distanceLabel;
+
+@end
+
+@implementation NearUserTableViewCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+
+- (void)setUser:(NSString *)userId distance:(int)distance{
+    
+    NIMUser *user = [[NIMSDK sharedSDK].userManager userInfo:userId];
+    
+    if(!_avatar)
+    {
+        _avatar = [[NIMAvatarImageView alloc] initWithFrame:CGRectMake(0, 0, _avatarContainer.width, _avatarContainer.height)];
+        [_avatarContainer addSubview:_avatar];
+    }
+    NSURL *url = user.userInfo && user.userInfo.avatarUrl ? [NSURL URLWithString:user.userInfo.avatarUrl] : nil;
+    [_avatar nim_setImageWithURL:url placeholderImage:User.defaultUserAvatar];
+    
+    _nickLabel.text = [[User sharedInfo] getUserName:user];
+    _distanceLabel.text = [[User sharedInfo] getDistanceStr:distance];
+}
+
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/NearUserViewController.h

@@ -0,0 +1,13 @@
+//
+//  NearUserViewController.h
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/24.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface NearUserViewController : UITableViewController
+
+@end

+ 122 - 0
NIMDemo/NIMDemo/NearUserViewController.m

@@ -0,0 +1,122 @@
+//
+//  NearUserViewController.m
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/24.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import "NearUserViewController.h"
+#import "HttpRequest.h"
+#import "NearUserTableViewCell.h"
+#import "User.h"
+
+@interface NearUserViewController ()
+
+@property (nonatomic, strong) NSMutableArray            *dataArr;
+
+@end
+
+@implementation NearUserViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+    __weak typeof(self) wself = self;
+    [[HttpRequest shared] nearUsers:1 success:^(NSMutableArray * _Nullable list) {
+        
+        wself.dataArr = list;
+        [wself.tableView reloadData];
+    } failure:^{
+        
+    }];
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)viewWillAppear:(BOOL)animated{
+    [super viewWillAppear:animated];
+    
+    [self.navigationItem setTitle:@"附近的人"];
+}
+
+#pragma mark - Table view data source
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+
+    if(_dataArr)
+        return _dataArr.count;
+    return 0;
+}
+
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    NearUserTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"nearUser" forIndexPath:indexPath];
+    
+    NSDictionary *dict = [_dataArr objectAtIndex:indexPath.row];
+    NSString *userId = [dict objectForKey:@"id"];
+    int distance = [[dict objectForKey:@"dist"] intValue];
+    [cell setUser:userId distance:distance];
+    
+    return cell;
+}
+
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    NSDictionary *dict = [_dataArr objectAtIndex:indexPath.row];
+    NSString *userId = [dict objectForKey:@"id"];
+    [User showUserInfo:userId viewController:self];
+}
+
+/*
+// Override to support conditional editing of the table view.
+- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
+    // Return NO if you do not want the specified item to be editable.
+    return YES;
+}
+*/
+
+/*
+// Override to support editing the table view.
+- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
+    if (editingStyle == UITableViewCellEditingStyleDelete) {
+        // Delete the row from the data source
+        [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
+    } else if (editingStyle == UITableViewCellEditingStyleInsert) {
+        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
+    }   
+}
+*/
+
+/*
+// Override to support rearranging the table view.
+- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
+}
+*/
+
+/*
+// Override to support conditional rearranging of the table view.
+- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
+    // Return NO if you do not want the item to be re-orderable.
+    return YES;
+}
+*/
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/SectionSetting/AddPhotoViewController.h

@@ -0,0 +1,13 @@
+//
+//  AddPhotoViewController.h
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/25.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface AddPhotoViewController : UIViewController
+
+@end

+ 199 - 0
NIMDemo/NIMDemo/SectionSetting/AddPhotoViewController.m

@@ -0,0 +1,199 @@
+//
+//  AddPhotoViewController.m
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/25.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import "AddPhotoViewController.h"
+#import "UIView+NTES.h"
+#import "UIView+Toast.h"
+#import "UIImageView+WebCache.h"
+#import "TradeModifyImageView.h"
+#import "User.h"
+#import "NIMKitMediaFetcher.h"
+#import "HttpRequest.h"
+#import "User.h"
+#import "SVProgressHUD.h"
+
+@interface AddPhotoViewController ()
+
+@property (nonatomic, strong) UIScrollView          *scrollView;
+
+@property (nonatomic, strong) UIView                *addImgView;
+@property (nonatomic, strong) NIMKitMediaFetcher    *mediaFetcher;
+
+@property (nonatomic, assign) float                 imgSize;
+@property (nonatomic, assign) float                 imgSpace;
+@property (nonatomic, assign) int                   imgColumns;
+
+@property (nonatomic, strong) NSMutableArray        *photoArr;
+@property (nonatomic, strong) NSMutableArray        *imgViewArr;
+
+@end
+
+@implementation AddPhotoViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.view.backgroundColor = UIColor.whiteColor;
+    
+    _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, self.view.height)];
+    _scrollView.showsVerticalScrollIndicator = YES;
+    [_scrollView setContentInset:UIEdgeInsetsMake(0, 0, 0, 0)];
+    [self.view addSubview:_scrollView];
+    
+    _imgSpace = 2;
+    _imgColumns = 3;
+    _imgSize = (self.view.width - _imgSpace * 2) / _imgColumns;
+    
+    _photoArr = [[User sharedInfo].userInfo.photeArr mutableCopy];
+    
+    [self fillImages];
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)viewWillAppear:(BOOL)animated{
+    [super viewWillAppear:animated];
+    
+    [self.navigationItem setTitle:@"添加照片"];
+}
+
+
+- (void)fillImages{
+    
+    int numPhotos = (int)(_photoArr.count);
+    
+    if(!_imgViewArr)
+        _imgViewArr = [[NSMutableArray alloc] init];
+    
+    for(int i=0; i<numPhotos; i++)
+    {
+        float x = (i%_imgColumns) * (_imgSize + _imgSpace);
+        float y = floorf(i/_imgColumns) * (_imgSize + _imgSpace);
+        
+        UIImageView *imgView = nil;
+        if(i >= _imgViewArr.count)
+        {
+            imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, _imgSize, _imgSize)];
+            [_scrollView addSubview:imgView];
+        }
+        else
+        {
+            imgView = [_imgViewArr objectAtIndex:i];
+        }
+        
+        [imgView setHidden:NO];
+        
+        NSMutableDictionary *photo = [_photoArr objectAtIndex:i];
+        NSString *thumb = [photo objectForKey:@"thumb"];
+        NSURL *url = [NSURL URLWithString:thumb];
+        [imgView sd_setImageWithURL:url placeholderImage:User.defaultPlaceHolderImage];
+        
+        imgView.left = x;
+        imgView.top = y;
+    }
+    
+    for(int j=numPhotos; j<_imgViewArr.count; j++)
+    {
+        [[_imgViewArr objectAtIndex:j] setHidden:YES];
+    }
+    
+    
+    if(!_addImgView)
+    {
+        _addImgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, _imgSize, _imgSize)];
+        _addImgView.backgroundColor = User.tinyGrayColor;
+        [_addImgView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTouchAddImg:)]];
+        [_scrollView addSubview:_addImgView];
+        
+        UIImageView *addIcon = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, _imgSize/4, _imgSize/4)];
+        addIcon.centerX = _imgSize / 2;
+        addIcon.bottom = _imgSize / 2;
+        [addIcon setImage:[UIImage imageNamed:@"编辑照片_03"]];
+        [_addImgView addSubview:addIcon];
+        
+        UILabel *addLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, _imgSize/2+10, _imgSize, 30)];
+        addLabel.text = @"添加照片";
+        addLabel.textColor = User.greenColor;
+        addLabel.textAlignment = NSTextAlignmentCenter;
+        [_addImgView addSubview:addLabel];
+    }
+    
+    float x = (numPhotos%_imgColumns) * (_imgSize + _imgSpace);
+    float y = floorf(numPhotos/_imgColumns) * (_imgSize + _imgSpace);
+    _addImgView.left = x;
+    _addImgView.top = y;
+    
+    
+    [_scrollView setContentSize:CGSizeMake(_scrollView.width, y+_imgSize)];
+}
+
+
+- (NIMKitMediaFetcher *)mediaFetcher
+{
+    if (!_mediaFetcher) {
+        _mediaFetcher = [[NIMKitMediaFetcher alloc] init];
+    }
+    return _mediaFetcher;
+}
+
+- (void)onTouchAddImg:(id)sender{
+    
+    [self showImagePicker:UIImagePickerControllerSourceTypePhotoLibrary];
+    
+}
+
+- (void)showImagePicker:(UIImagePickerControllerSourceType)type{
+    
+    __weak typeof(self) weakSelf = self;
+    self.mediaFetcher.limit = 1;
+    [self.mediaFetcher fetchPhotoFromLibrary:^(NSArray *images, NSString *path, PHAssetMediaType type) {
+        
+        switch (type) {
+            case PHAssetMediaTypeImage:
+            {
+                for (UIImage *image in images) {
+                    [weakSelf uploadImage:image];
+                }
+
+            }
+                break;
+            case PHAssetMediaTypeVideo:
+            {
+            }
+                break;
+            default:
+                return;
+        }
+    }];
+}
+
+
+- (void)uploadImage:(UIImage *)image{
+    
+    [SVProgressHUD show];
+    
+    __weak typeof(self) wself = self;
+    [[HttpRequest shared] uploadPhoto:image success:^(NSMutableDictionary * _Nullable photoData) {
+        
+        [SVProgressHUD dismiss];
+        
+        [[User sharedInfo].userInfo.photeArr insertObject:photoData atIndex:0];
+        _photoArr = [[User sharedInfo].userInfo.photeArr mutableCopy];
+        [wself fillImages];
+        
+        [self.view makeToast:@"上传成功" duration:2 position:CSToastPositionCenter];
+    } failure:^{
+        [self.view makeToast:@"上传失败" duration:2 position:CSToastPositionCenter];
+    }];
+    
+}
+
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/SectionSetting/ChangePasswordViewController.h

@@ -0,0 +1,13 @@
+//
+//  ChangePasswordViewController.h
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/24.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface ChangePasswordViewController : UITableViewController
+
+@end

+ 107 - 0
NIMDemo/NIMDemo/SectionSetting/ChangePasswordViewController.m

@@ -0,0 +1,107 @@
+//
+//  ChangePasswordViewController.m
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/24.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import "ChangePasswordViewController.h"
+#import "HttpRequest.h"
+#import "SVProgressHUD.h"
+#import "UIView+Toast.h"
+
+@interface ChangePasswordViewController ()<UITextFieldDelegate>
+
+@property (weak, nonatomic) IBOutlet UITextField *originLabel;
+@property (weak, nonatomic) IBOutlet UITextField *changeLabel;
+@property (weak, nonatomic) IBOutlet UITextField *confirmLabel;
+
+@end
+
+@implementation ChangePasswordViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+    _originLabel.delegate = self;
+    _changeLabel.delegate = self;
+    _confirmLabel.delegate = self;
+    
+    _originLabel.borderStyle = UITextBorderStyleNone;
+    _changeLabel.borderStyle = UITextBorderStyleNone;
+    _confirmLabel.borderStyle = UITextBorderStyleNone;
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)viewWillAppear:(BOOL)animated{
+    [super viewWillAppear:animated];
+    
+    UIButton *doneBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+    [doneBtn setTitle:@"完成" forState:UIControlStateNormal];
+    [doneBtn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
+    [doneBtn addTarget:self action:@selector(onTouchDone:) forControlEvents:UIControlEventTouchUpInside];
+    [doneBtn sizeToFit];
+    
+    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithCustomView:doneBtn];
+    
+    [self.navigationItem setRightBarButtonItems:@[rightItem]];
+}
+
+
+- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
+    
+    if ([string isEqualToString:@"\n"]) {
+        [textField resignFirstResponder];
+        return NO;
+    }
+    return YES;
+}
+
+- (void)reset{
+    _originLabel.text = @"";
+    _changeLabel.text = @"";
+    _confirmLabel.text = @"";
+}
+
+- (void)onTouchDone:(id)sender{
+    
+    NSString *origin = _originLabel.text;
+    NSString *change = _changeLabel.text;
+    NSString *confirm = _confirmLabel.text;
+    
+    int min = 8;
+    int max = 12;
+    
+    if(change.length < min || change.length > max)
+    {
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"密码长度不正确" message:nil delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
+        [alert show];
+        return;
+    }
+    
+    if(![change isEqualToString:confirm])
+    {
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"确认密码与修改密码不一样" message:nil delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
+        [alert show];
+        return;
+    }
+    
+    [SVProgressHUD show];
+    __weak typeof(self) wself = self;
+    [[HttpRequest shared] changePassword:origin changePwd:change success:^{
+        [SVProgressHUD dismiss];
+        [wself.view makeToast:@"修改密码成功" duration:2 position:CSToastPositionCenter];
+        [wself reset];
+    } failure:^{
+        [SVProgressHUD dismiss];
+        [wself.view makeToast:@"修改密码失败,原始密码不正确或网络存在问题,请重试。" duration:2 position:CSToastPositionCenter];
+    }];
+    
+}
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/SectionSetting/FeedBackViewController.h

@@ -0,0 +1,13 @@
+//
+//  FeedBackViewController.h
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/24.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface FeedBackViewController : UIViewController<UITextViewDelegate>
+
+@end

+ 158 - 0
NIMDemo/NIMDemo/SectionSetting/FeedBackViewController.m

@@ -0,0 +1,158 @@
+//
+//  FeedBackViewController.m
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/24.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import "FeedBackViewController.h"
+#import "HttpRequest.h"
+#import "UIView+Toast.h"
+#import "SVProgressHUD.h"
+
+@interface FeedBackViewController ()<UIActionSheetDelegate, UIImagePickerControllerDelegate,
+UINavigationControllerDelegate>
+
+@property (weak, nonatomic) IBOutlet UITextView *msgTextField;
+@property (weak, nonatomic) IBOutlet UILabel *placeHolderLabel;
+@property (weak, nonatomic) IBOutlet UILabel *textCountLabel;
+@property (weak, nonatomic) IBOutlet UIButton *addPicBtn;
+
+
+@property (strong, nonatomic) UIActionSheet *picActionSheet;
+@property (strong, nonatomic) UIImage       *picImage;
+
+@end
+
+@implementation FeedBackViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)viewWillAppear:(BOOL)animated{
+    [super viewWillAppear:animated];
+    
+    [self.navigationItem setTitle:@"帮助与反馈"];
+    
+    UIButton *doneBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+    [doneBtn setTitle:@"提交" forState:UIControlStateNormal];
+    [doneBtn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
+    [doneBtn addTarget:self action:@selector(onTouchDone:) forControlEvents:UIControlEventTouchUpInside];
+    [doneBtn sizeToFit];
+    
+    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithCustomView:doneBtn];
+    
+    [self.navigationItem setRightBarButtonItems:@[rightItem]];
+}
+
+
+- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{
+    
+    if([text isEqualToString:@"\n"])
+    {
+        [textView resignFirstResponder];
+        return NO;
+    }
+    
+    if(textView.text.length > 300)
+    {
+        return NO;
+    }
+    
+    _placeHolderLabel.hidden = textView.text.length > 0;
+    
+    _textCountLabel.text = [@(300 - textView.text.length) stringValue];
+    
+    return YES;
+}
+- (IBAction)onTouchAddPic:(id)sender {
+    _picActionSheet = [[UIActionSheet alloc] initWithTitle:@"添加图片" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"拍照",@"从相册", nil];
+    [_picActionSheet showInView:self.view];
+    
+}
+
+- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)index{
+    if (actionSheet == _picActionSheet)
+    {
+        [self onAvatarActionSheet:actionSheet index:index];
+    }
+}
+
+- (void)onAvatarActionSheet:(UIActionSheet *)actionSheet index:(NSInteger)index
+{
+    switch (index) {
+        case 0:
+            [self showImagePicker:UIImagePickerControllerSourceTypeCamera];
+            break;
+        case 1:
+            [self showImagePicker:UIImagePickerControllerSourceTypePhotoLibrary];
+            break;
+        default:
+            break;
+    }
+}
+
+
+- (void)showImagePicker:(UIImagePickerControllerSourceType)type{
+    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
+    picker.delegate      = self;
+    picker.sourceType    = type;
+    picker.allowsEditing = YES;
+    [self presentViewController:picker animated:YES completion:nil];
+}
+
+
+#pragma mark - UIImagePickerControllerDelegate
+- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
+    UIImage *image = info[UIImagePickerControllerEditedImage];
+    [picker dismissViewControllerAnimated:YES completion:^{
+        [self uploadImage:image];
+    }];
+}
+
+- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
+    [picker dismissViewControllerAnimated:YES completion:nil];
+}
+
+
+#pragma mark - Private
+- (void)uploadImage:(UIImage *)image{
+    _picImage = image;
+    [_addPicBtn setBackgroundImage:image forState:UIControlStateNormal];
+}
+
+- (void)reset{
+    _msgTextField.text = @"";
+    _picImage = nil;
+    [_addPicBtn setBackgroundImage:[UIImage imageNamed:@"帮助与反馈_03"] forState:UIControlStateNormal];
+}
+
+- (void)onTouchDone:(id)sender{
+    
+    [SVProgressHUD show];
+    __weak typeof(self) wself = self;
+    [[HttpRequest shared] feedBacck:_msgTextField.text image:_picImage success:^{
+        
+        [SVProgressHUD dismiss];
+        [wself.view makeToast:@"发送成功" duration:2 position:CSToastPositionCenter];
+        
+        [wself reset];
+    } failure:^{
+        [SVProgressHUD dismiss];
+        [wself.view makeToast:@"发送失败,请重试。" duration:2 position:CSToastPositionCenter];
+        
+    }];
+    
+}
+
+@end

+ 13 - 0
NIMDemo/NIMDemo/SectionSetting/PrivacyViewController.h

@@ -0,0 +1,13 @@
+//
+//  PrivacyViewController.h
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/24.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface PrivacyViewController : UITableViewController
+
+@end

+ 193 - 0
NIMDemo/NIMDemo/SectionSetting/PrivacyViewController.m

@@ -0,0 +1,193 @@
+//
+//  PrivacyViewController.m
+//  NIMDemo
+//
+//  Created by Fenix Wang on 2017/7/24.
+//  Copyright © 2017年 Netease. All rights reserved.
+//
+
+#import "PrivacyViewController.h"
+#import "User.h"
+#import "HttpRequest.h"
+#import "SVProgressHUD.h"
+#import "UIView+Toast.h"
+#import "NTESBlackListViewController.h"
+
+@interface PrivacyViewController ()
+@property (weak, nonatomic) IBOutlet UISwitch *verifySwitch;
+@property (weak, nonatomic) IBOutlet UISwitch *findMobileSwitch;
+@property (weak, nonatomic) IBOutlet UISwitch *findIdSwitch;
+@property (weak, nonatomic) IBOutlet UISwitch *findNickSwitch;
+@property (weak, nonatomic) IBOutlet UISwitch *seeSocialSwitch;
+@property (weak, nonatomic) IBOutlet UISwitch *effectSwitch;
+
+@end
+
+@implementation PrivacyViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+    [self fillData];
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    
+    
+}
+
+- (void)viewWillAppear:(BOOL)animated{
+    [super viewWillAppear:animated];
+    [self.navigationItem setTitle:@"隐私"];
+}
+
+- (void)fillData{
+    
+    UserInfo *userInfo = [User sharedInfo].userInfo;
+    
+    [_verifySwitch setOn:(userInfo.addVerify == 0 ? YES : NO)];
+    [_findMobileSwitch setOn:(userInfo.findMobile == 0 ? YES : NO)];
+    [_findIdSwitch setOn:(userInfo.findId == 0 ? YES : NO)];
+    [_findNickSwitch setOn:(userInfo.findNick == 0 ? YES : NO)];
+    [_seeSocialSwitch setOn:(userInfo.seeSocial == 0 ? YES : NO)];
+    [_effectSwitch setOn:(userInfo.effect == 0 ? YES : NO)];
+    
+}
+
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+    if(cell.tag == 1)
+    {
+        NTESBlackListViewController *blackList = [[NTESBlackListViewController alloc] init];
+        [self.navigationController pushViewController:blackList animated:YES];
+    }
+    
+    
+}
+
+
+
+
+- (IBAction)verifyChanged:(id)sender {
+    
+    NSString *verify = _verifySwitch.isOn ? @"0" : @"1";
+
+    [SVProgressHUD show];
+    __weak typeof(self) wself = self;
+    NSMutableDictionary *data = [[NSMutableDictionary alloc] init];
+    [data setValue:verify forKey:@"add_verify"];
+    [[HttpRequest shared] updateUserInfo:data success:^{
+        [SVProgressHUD dismiss];
+        [User sharedInfo].userInfo.addVerify = [verify intValue];
+    } failure:^{
+        [SVProgressHUD dismiss];
+        [wself.view makeToast:@"设置失败,请重试"
+                     duration:2
+                     position:CSToastPositionCenter];
+        
+        [self fillData];
+    }];
+    
+}
+
+- (IBAction)findMobileChanged:(id)sender {
+    
+    NSString *findMobile = _findMobileSwitch.isOn ? @"0" : @"1";
+    
+    [SVProgressHUD show];
+    __weak typeof(self) wself = self;
+    NSMutableDictionary *data = [[NSMutableDictionary alloc] init];
+    [data setValue:findMobile forKey:@"find_mobile"];
+    [[HttpRequest shared] updateUserInfo:data success:^{
+        [SVProgressHUD dismiss];
+        [User sharedInfo].userInfo.findMobile = [findMobile intValue];
+    } failure:^{
+        [SVProgressHUD dismiss];
+        [wself.view makeToast:@"设置失败,请重试"
+                     duration:2
+                     position:CSToastPositionCenter];
+        [self fillData];
+    }];
+}
+
+- (IBAction)findIdChanged:(id)sender {
+    NSString *findId = _findIdSwitch.isOn ? @"0" : @"1";
+    
+    [SVProgressHUD show];
+    __weak typeof(self) wself = self;
+    NSMutableDictionary *data = [[NSMutableDictionary alloc] init];
+    [data setValue:findId forKey:@"find_id"];
+    [[HttpRequest shared] updateUserInfo:data success:^{
+        [SVProgressHUD dismiss];
+        [User sharedInfo].userInfo.findId = [findId intValue];
+    } failure:^{
+        [SVProgressHUD dismiss];
+        [wself.view makeToast:@"设置失败,请重试"
+                     duration:2
+                     position:CSToastPositionCenter];
+        [self fillData];
+    }];
+}
+
+- (IBAction)findNickChanged:(id)sender {
+    NSString *findNick = _findNickSwitch.isOn ? @"0" : @"1";
+    
+    [SVProgressHUD show];
+    __weak typeof(self) wself = self;
+    NSMutableDictionary *data = [[NSMutableDictionary alloc] init];
+    [data setValue:findNick forKey:@"find_nick"];
+    [[HttpRequest shared] updateUserInfo:data success:^{
+        [SVProgressHUD dismiss];
+        [User sharedInfo].userInfo.findNick = [findNick intValue];
+    } failure:^{
+        [SVProgressHUD dismiss];
+        [wself.view makeToast:@"设置失败,请重试"
+                     duration:2
+                     position:CSToastPositionCenter];
+        [self fillData];
+    }];
+}
+
+- (IBAction)seeSocialChanged:(id)sender {
+    NSString *seeSocial = _seeSocialSwitch.isOn ? @"0" : @"1";
+    
+    [SVProgressHUD show];
+    __weak typeof(self) wself = self;
+    NSMutableDictionary *data = [[NSMutableDictionary alloc] init];
+    [data setValue:seeSocial forKey:@"see_social"];
+    [[HttpRequest shared] updateUserInfo:data success:^{
+        [SVProgressHUD dismiss];
+        [User sharedInfo].userInfo.seeSocial = [seeSocial intValue];
+    } failure:^{
+        [SVProgressHUD dismiss];
+        [wself.view makeToast:@"设置失败,请重试"
+                     duration:2
+                     position:CSToastPositionCenter];
+        [self fillData];
+    }];
+}
+
+- (IBAction)effectChanged:(id)sender {
+    NSString *effect = _effectSwitch.isOn ? @"0" : @"1";
+    
+    [SVProgressHUD show];
+    __weak typeof(self) wself = self;
+    NSMutableDictionary *data = [[NSMutableDictionary alloc] init];
+    [data setValue:effect forKey:@"effect"];
+    [[HttpRequest shared] updateUserInfo:data success:^{
+        [SVProgressHUD dismiss];
+        [User sharedInfo].userInfo.effect = [effect intValue];
+    } failure:^{
+        [SVProgressHUD dismiss];
+        [wself.view makeToast:@"设置失败,请重试"
+                     duration:2
+                     position:CSToastPositionCenter];
+        [self fillData];
+    }];
+}
+
+
+@end

+ 4 - 0
NIMDemo/NIMDemo/SectionSetting/SettingSecurityViewController.m

@@ -64,6 +64,10 @@
 
 - (void)handlePassword{
     NSLog(@"handlePassword");
+    
+    UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
+    UIViewController *vc = [storyBoard instantiateViewControllerWithIdentifier:@"ChangePassword"];
+    [self.navigationController pushViewController:vc animated:YES];
 }
 
 

+ 36 - 6
NIMDemo/NIMDemo/SectionTrade/TradeDetailViewController.m

@@ -27,6 +27,7 @@
 @property (nonatomic, strong) UITextView                    *msgTextView;
 @property (nonatomic, strong) UIView                        *imgContainer;
 @property (nonatomic, strong) UIButton                      *priorityBtn;
+@property (nonatomic, strong) UIImage                       *firstImg;
 
 @end
 
@@ -54,6 +55,15 @@
     // Dispose of any resources that can be recreated.
 }
 
+- (void)viewWillAppear:(BOOL)animated{
+    [super viewWillAppear:animated];
+    
+    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(onTouchShare:)];
+    [self.navigationItem setRightBarButtonItems:@[rightItem]];
+    
+    [self.navigationItem setTitle:@"详情"];
+}
+
 
 - (void)setUpComponent{
     
@@ -144,6 +154,8 @@
     
     float imgWidth = _imgContainer.width;
     
+    _firstImg = nil;
+    
     __weak typeof(self) wself = self;
     for(int i=0; i<_data.picArr.count; i++)
     {
@@ -186,6 +198,11 @@
         UIImageView *imgView = [_imgContainer.subviews objectAtIndex:i];
         NSLog(@"image view width %f height %f", imgView.width, imgView.height);
         
+        if(i==0 && imgView.height > 0 && !_firstImg)
+        {
+            _firstImg = imgView.image;
+        }
+        
         imgView.top = startY;
         startY = imgView.bottom + space;
     }
@@ -195,11 +212,7 @@
 }
 
 
-- (void)viewWillAppear:(BOOL)animated{
-    [super viewWillAppear:animated];
-    
-    [self.navigationItem setTitle:@"详情"];
-}
+
 
 
 
@@ -228,5 +241,22 @@
     [self.navigationController pushViewController:imagePageVC animated:YES];
 }
 
-
+- (void)onTouchShare:(id)sender{
+    
+    NSString *textToShare = _data.msg;
+    
+    NSArray *activityItems = nil;
+    if(_firstImg)
+    {
+        activityItems = @[textToShare, _firstImg];
+    }
+    else
+    {
+        activityItems = @[textToShare];
+    }
+    
+    UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
+    activityVC.excludedActivityTypes = @[UIActivityTypePostToVimeo];
+    [self presentViewController:activityVC animated:YES completion:nil];
+}
 @end

+ 6 - 4
NIMDemo/NIMDemo/SectionTrade/TradeTableViewCell.m

@@ -30,7 +30,7 @@
 @property (nonatomic, strong) UIView                        *imgContainer;
 @property (nonatomic, strong) UIView                        *actionContainer;
 @property (nonatomic, strong) UIButton                      *priorityBtn;
-
+@property (nonatomic, strong) UIImageView                   *followIcon;
 
 @property (nonatomic, strong) TradeData                     *data;
 
@@ -77,9 +77,9 @@ return self;
     [_followContainer addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTouchFollow:)]];
     [self addSubview:_followContainer];
     
-    UIImageView *followIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 0, 20, 20)];
-    [followIcon setImage:[UIImage imageNamed:@"交易帖_03"]];
-    [_followContainer addSubview:followIcon];
+    _followIcon = [[UIImageView alloc] initWithFrame:CGRectMake(15, 0, 20, 20)];
+    [_followIcon setImage:[UIImage imageNamed:@"交易帖_03"]];
+    [_followContainer addSubview:_followIcon];
     
     _followLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, _followContainer.width, 20)];
     _followLabel.font = [UIFont systemFontOfSize:13];
@@ -232,10 +232,12 @@ return self;
     if(_data.followed)
     {
         _followLabel.text = @"已关注";
+        [_followIcon setImage:[UIImage imageNamed:@"交易帖_03 (2)"]];
     }
     else
     {
         _followLabel.text = @"关注";
+        [_followIcon setImage:[UIImage imageNamed:@"交易帖_03"]];
     }
     
 }

+ 59 - 5
NIMDemo/NIMDemo/SettingAccountViewController.m

@@ -11,6 +11,8 @@
 #import "NIMSDK/NIMSDK.h"
 #import "UIAlertView+NTESBlock.h"
 #import "UIView+NTES.h"
+#import "UIActionSheet+NTESBlock.h"
+#import "UIView+Toast.h"
 
 @interface SettingAccountViewController ()
 
@@ -39,6 +41,8 @@
 {
     [super viewWillAppear:animated];
     [self.navigationItem setTitle:@"设置"];
+    
+    [self updateNotify];
 }
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
@@ -68,8 +72,6 @@
 
 
 - (void)handleSecurity{
-    NSLog(@"handleSecurity");
-    
     UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
     UIViewController *vc = [storyBoard instantiateViewControllerWithIdentifier:@"SecuritySetting"];
     [self.navigationController pushViewController:vc animated:YES];
@@ -77,15 +79,67 @@
 
 
 - (void)handleNotify{
-    NSLog(@"handleNotify");
+    UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"设置消息通知" delegate:nil cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"正常", @"静音", nil];
+    
+    __weak typeof(self) wself = self;
+    [sheet showInView:self.view completionHandler:^(NSInteger index) {
+        switch (index) {
+            case 0:
+            {
+                NIMPushNotificationSetting *setting = [[NIMSDK sharedSDK].apnsManager currentSetting];
+                setting.noDisturbing = NO;
+                [[NIMSDK sharedSDK].apnsManager updateApnsSetting:setting completion:^(NSError *error) {
+                    if (error) {
+                        [wself.view makeToast:@"消息通知设置更新失败" duration:2.0 position:CSToastPositionCenter];
+                    }
+                    [wself updateNotify];
+                }];
+                break;
+            }
+            case 1:
+            {
+                NIMPushNotificationSetting *setting = [[NIMSDK sharedSDK].apnsManager currentSetting];
+                setting.noDisturbing = YES;
+                [[NIMSDK sharedSDK].apnsManager updateApnsSetting:setting completion:^(NSError *error) {
+                    if (error) {
+                        [wself.view makeToast:@"消息通知设置更新失败" duration:2.0 position:CSToastPositionCenter];
+                    }
+                    [wself updateNotify];
+                }];
+                break;
+            }
+            default:
+                break;
+        }
+    }];
+    
+    
+}
+
+- (void)updateNotify{
+    NIMPushNotificationSetting *setting = [[NIMSDK sharedSDK].apnsManager currentSetting];
+    BOOL enableNoDisturbing = setting.noDisturbing;
+    
+    if(enableNoDisturbing)
+    {
+        _notifyLabel.text = @"静音";
+    }
+    else
+    {
+        _notifyLabel.text = @"正常";
+    }
 }
 
 - (void)handlePrivacy{
-    NSLog(@"handlePrivacy");
+    UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
+    UIViewController *vc = [storyBoard instantiateViewControllerWithIdentifier:@"Privacy"];
+    [self.navigationController pushViewController:vc animated:YES];
 }
 
 - (void)handleHelp{
-    NSLog(@"handleHelp");
+    UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
+    UIViewController *vc = [storyBoard instantiateViewControllerWithIdentifier:@"FeedBack"];
+    [self.navigationController pushViewController:vc animated:YES];
 }
 
 - (void)handleAbout{

+ 3 - 1
NIMDemo/NIMDemo/SettingOptionTableViewCell.m

@@ -82,7 +82,9 @@
     NSString *type = [_data objectForKey:@"type"];
     if([type isEqualToString:@"near"])
     {
-        
+        UIStoryboard *board = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
+        UIViewController *next = (UIViewController *)[board instantiateViewControllerWithIdentifier:@"NearUser"];
+        [self.viewController.navigationController pushViewController:next animated:YES];
     }
     else if([type isEqualToString:@"trade"])
     {

+ 14 - 5
NIMDemo/NIMDemo/SettingTableViewController.m

@@ -30,8 +30,12 @@
     
     _dataArr = [[NSMutableArray alloc] init];
     
+    float topHeight = 300;
+    float photoHeight = [User sharedInfo].userInfo.photeArr.count > 4 ? self.view.width / 4 * 2 : self.view.width / 4;
+    topHeight += photoHeight;
+    
     [_dataArr addObject:@{@"cellId":@"top",
-                          @"height":@"300"}];
+                          @"height":[@(topHeight) stringValue]}];
     
     [_dataArr addObject:@{@"cellId":@"option",
                           @"type":@"near",
@@ -57,10 +61,6 @@
 - (void)viewWillAppear:(BOOL)animated{
     [super viewWillAppear:animated];
     
-    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
-    [appDelegate transparentNavBar:self.parentViewController];
-    
-    
     UINavigationItem *navItem = self.parentViewController.navigationItem;
     
     [navItem setTitle:@""];
@@ -81,6 +81,14 @@
     
     [navItem setRightBarButtonItems:@[addItem]];
     
+    [self.tableView reloadData];
+}
+
+- (void)viewDidAppear:(BOOL)animated{
+    [super viewDidAppear:animated];
+    
+    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+    [appDelegate transparentNavBar:self.parentViewController];
 }
 
 - (void)viewWillDisappear:(BOOL)animated{
@@ -117,6 +125,7 @@
             cell = [[SettingTopTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
             [cell initSize:self.view.width cellHeight:[[dataObj objectForKey:@"height"] floatValue]];
         }
+        [cell fillPhotos];
         baseCell = cell;
     }
     else if([cellId isEqualToString:@"option"])

+ 1 - 0
NIMDemo/NIMDemo/SettingTopTableViewCell.h

@@ -11,5 +11,6 @@
 @interface SettingTopTableViewCell : UITableViewCell
 
 - (void)initSize:(CGFloat)cellWidth cellHeight:(CGFloat)cellHeight;
+- (void)fillPhotos;
 
 @end

+ 153 - 2
NIMDemo/NIMDemo/SettingTopTableViewCell.m

@@ -12,14 +12,21 @@
 #import "NIMSDK/NIMSDK.h"
 #import "UIView+NTES.h"
 #import "UIImageView+WebCache.h"
+#import "UIActionSheet+NTESBlock.h"
+#import "HttpRequest.h"
+#import "AddPhotoViewController.h"
 
-@interface SettingTopTableViewCell()
+@interface SettingTopTableViewCell()<UINavigationControllerDelegate, UIImagePickerControllerDelegate>
 
 @property (strong, nonatomic) UIImageView             *topImgView;
 @property (strong, nonatomic) NIMAvatarImageView      *avatarImg;
 @property (strong, nonatomic) UIImageView             *genderImg;
 @property (strong, nonatomic) UILabel                 *userNameLabel;
 @property (strong, nonatomic) UILabel                 *userIdLabel;
+@property (strong, nonatomic) UIView                  *photoContainer;
+@property (strong, nonatomic) UIButton                *photoAddBtn;
+
+@property (nonatomic, assign) float                   cellWidth;
 
 @end
 
@@ -36,12 +43,15 @@
 
 - (void)initSize:(CGFloat)cellWidth cellHeight:(CGFloat)cellHeight{
     
+    self.cellWidth = cellWidth;
+    
     NSString *userId = [NIMSDK sharedSDK].loginManager.currentAccount;
     NIMUser *nimUser = [[NIMSDK sharedSDK].userManager userInfo:userId];
     
     _topImgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, cellWidth, 180)];
     _topImgView.userInteractionEnabled = YES;
-    [_topImgView setImage:[UIImage imageNamed:@"群资料_01"]];
+    _topImgView.contentMode =  UIViewContentModeScaleAspectFill;
+    _topImgView.clipsToBounds  = YES;
     [_topImgView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTouchTopImage:)]];
     [self addSubview:_topImgView];
     
@@ -78,15 +88,156 @@
     [self addSubview:_userIdLabel];
     
     
+    
+    [self fillPhotos];
+    
+    
+    
     UIView *step = [[UIView alloc] initWithFrame:CGRectMake(0, cellHeight-0.5, cellWidth, 0.5)];
     step.backgroundColor = UIColor.lightGrayColor;
     [self addSubview:step];
+ 
+    [self updateBanner];
+}
+
+
+- (void)fillPhotos
+{
+    if(!_photoContainer)
+    {
+        _photoContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 300, _cellWidth, 0)];
+        _photoContainer.backgroundColor = UIColor.groupTableViewBackgroundColor;
+        [self addSubview:_photoContainer];
+    }
     
+    float space = 1;
+    int columns = 4;
+    float picWidth = (_cellWidth - (columns - 1) * space) / columns;
+    
+    NSMutableArray *photos = [User sharedInfo].userInfo.photeArr;
+    for(int i=0; i<photos.count; i++)
+    {
+        float x = (i%columns) * (picWidth+space);
+        float y = floorf(i/columns) * (picWidth+space);
+        UIImageView *imgView = nil;
+        if(i >= _photoContainer.subviews.count)
+        {
+            imgView = [[UIImageView alloc] init];
+            [_photoContainer addSubview:imgView];
+        }
+        else
+        {
+            imgView = [_photoContainer.subviews objectAtIndex:i];
+        }
+        
+        [imgView setHidden:NO];
+        [imgView setFrame:CGRectMake(x, y, picWidth, picWidth)];
+        
+        NSString *thumb = [[photos objectAtIndex:i] objectForKey:@"thumb"];
+        NSURL *url = [NSURL URLWithString:thumb];
+        [imgView sd_setImageWithURL:url placeholderImage:User.defaultPlaceHolderImage];
+    }
+    
+    int numPhotos = (int)(photos.count);
+    for(int j=numPhotos; j<_photoContainer.subviews.count; j++)
+    {
+        [[_photoContainer.subviews objectAtIndex:j] setHidden:YES];
+    }
+    
+    _photoContainer.height = floorf(numPhotos/columns) * (picWidth+space) + picWidth;
+    
+    
+    if(!_photoAddBtn)
+    {
+        _photoAddBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+        _photoAddBtn.frame = CGRectMake(0, 0, picWidth, picWidth);
+        _photoAddBtn.backgroundColor = UIColor.whiteColor;
+        [self addSubview:_photoAddBtn];
+        
+        
+        UIImageView *addIcon = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, picWidth/4, picWidth/4)];
+        addIcon.centerX = picWidth / 2;
+        addIcon.bottom = picWidth / 2;
+        [addIcon setImage:[UIImage imageNamed:@"编辑照片_03"]];
+        [_photoAddBtn addSubview:addIcon];
+        
+        UILabel *addLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, picWidth/2+10, picWidth, 30)];
+        addLabel.text = @"添加照片";
+        addLabel.textColor = User.greenColor;
+        addLabel.textAlignment = NSTextAlignmentCenter;
+        [_photoAddBtn addSubview:addLabel];
+        
+        [_photoAddBtn addTarget:self action:@selector(onTouchAddPhoto:) forControlEvents:UIControlEventTouchUpInside];
+    }
+    
+    float x = (numPhotos%columns) * (picWidth+space);
+    float y = floorf(numPhotos/columns) * (picWidth+space) + _photoContainer.top;
+    _photoAddBtn.left = x;
+    _photoAddBtn.top = y;
+}
+
+
+- (void)updateBanner{
+    NSString *imgURL = [User sharedInfo].userInfo.socialBanner;
+    NSURL *url = imgURL && imgURL.length > 0 ? [NSURL URLWithString:imgURL] : nil;
+    [self.topImgView sd_setImageWithURL:url placeholderImage:User.defaultSocialBanner];
 }
 
 - (void)onTouchTopImage:(id)sender{
     
+    UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"设置封面" delegate:nil cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"从相册", nil];
+    [sheet showInView:self.viewController.view completionHandler:^(NSInteger index) {
+        switch (index) {
+            case 0:
+                [self showImagePicker:UIImagePickerControllerSourceTypePhotoLibrary];
+                break;
+            default:
+                break;
+        }
+    }];
+    
+}
+
+- (void)showImagePicker:(UIImagePickerControllerSourceType)type{
+    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
+    picker.delegate      = self;
+    picker.sourceType    = type;
+    picker.allowsEditing = YES;
+    [self.viewController.navigationController presentViewController:picker animated:YES completion:nil];
+}
+
+- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
+    UIImage *image = info[UIImagePickerControllerEditedImage];
+    [picker dismissViewControllerAnimated:YES completion:^{
+        [self uploadImage:image];
+    }];
+}
+
+- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
+    [picker dismissViewControllerAnimated:YES completion:nil];
+}
+
+- (void)uploadImage:(UIImage *)image{
+    
+    __weak typeof(self) wself = self;
+    [[HttpRequest shared] uploadSocialBanner:image success:^(NSString * _Nullable imgURL) {
+        
+        [User sharedInfo].userInfo.socialBanner = imgURL;
+        
+        [wself updateBanner];
+        
+    } failure:^{
+        
+    }];
+    
+}
+
+
+
+- (void)onTouchAddPhoto:(id)sender{
     
+    AddPhotoViewController *vc = [[AddPhotoViewController alloc] init];
+    [self.viewController.navigationController pushViewController:vc animated:YES];
     
 }
 

+ 1 - 0
NIMDemo/NIMDemo/SocialTableViewCell.h

@@ -14,4 +14,5 @@
 - (void)initWidth:(CGFloat)cellWidth;
 - (void)setData:(SocialItemData *)data;
 
+
 @end

+ 1 - 0
NIMDemo/NIMDemo/SocialTableViewCell.m

@@ -548,4 +548,5 @@
     [self.viewController.navigationController pushViewController:imagePageVC animated:YES];
 }
 
+
 @end

+ 10 - 0
NIMDemo/NIMDemo/SocialTableViewController.m

@@ -209,6 +209,11 @@
     return baseCell;
 }
 
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    [self.view endEditing:YES];
+}
+
 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
     
     NSObject *data = [_dataList objectAtIndex:indexPath.row];
@@ -382,4 +387,9 @@
     _commentContainer.hidden = endFrame.origin.y == self.view.height;
 }
 
+
+- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
+    [self.view endEditing:YES];
+}
+
 @end

+ 63 - 2
NIMDemo/NIMDemo/SocialTopTableViewCell.m

@@ -11,8 +11,11 @@
 #import "UIView+NTES.h"
 #import "UIImageView+WebCache.h"
 #import "User.h"
+#import "HttpRequest.h"
+#import "UIActionSheet+NTESBlock.h"
 
-@interface SocialTopTableViewCell()
+
+@interface SocialTopTableViewCell()<UINavigationControllerDelegate, UIImagePickerControllerDelegate>
 
 @property (nonatomic, strong) UIImageView           *imgBg;
 @property (nonatomic, strong) NIMAvatarImageView    *avatarImg;
@@ -34,7 +37,10 @@
 - (void)initSize:(CGFloat)cellWidth cellHeight:(CGFloat)cellHeight{
     
     _imgBg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, cellWidth, cellHeight)];
-    [_imgBg setImage:[UIImage imageNamed:@"群资料_01"]];
+    _imgBg.userInteractionEnabled = YES;
+    _imgBg.contentMode =  UIViewContentModeScaleAspectFill;
+    _imgBg.clipsToBounds  = YES;
+    [_imgBg addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTouchBanner:)]];
     [self addSubview:_imgBg];
     
     
@@ -55,6 +61,61 @@
     [_avatarImg nim_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"avatar_user2"]];
     
     _nameLabel.text = nimUser && nimUser.userInfo.nickName ? nimUser.userInfo.nickName : userId;
+    
+    [self updateBanner];
+}
+
+- (void)onTouchBanner:(UITapGestureRecognizer *)gestureRecognizer{
+    UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"设置封面" delegate:nil cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"从相册", nil];
+    [sheet showInView:self.viewController.view completionHandler:^(NSInteger index) {
+        switch (index) {
+            case 0:
+                [self showImagePicker:UIImagePickerControllerSourceTypePhotoLibrary];
+                break;
+            default:
+                break;
+        }
+    }];
+}
+
+- (void)showImagePicker:(UIImagePickerControllerSourceType)type{
+    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
+    picker.delegate      = self;
+    picker.sourceType    = type;
+    picker.allowsEditing = YES;
+    [self.viewController.navigationController presentViewController:picker animated:YES completion:nil];
+}
+
+- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
+    UIImage *image = info[UIImagePickerControllerEditedImage];
+    [picker dismissViewControllerAnimated:YES completion:^{
+        [self uploadImage:image];
+    }];
+}
+
+- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
+    [picker dismissViewControllerAnimated:YES completion:nil];
+}
+
+- (void)uploadImage:(UIImage *)image{
+    
+    __weak typeof(self) wself = self;
+    [[HttpRequest shared] uploadSocialBanner:image success:^(NSString * _Nullable imgURL) {
+        
+        [User sharedInfo].userInfo.socialBanner = imgURL;
+        
+        [wself updateBanner];
+        
+    } failure:^{
+        
+    }];
+    
+}
+
+- (void)updateBanner{
+    NSString *imgURL = [User sharedInfo].userInfo.socialBanner;
+    NSURL *url = imgURL && imgURL.length > 0 ? [NSURL URLWithString:imgURL] : nil;
+    [self.imgBg sd_setImageWithURL:url placeholderImage:User.defaultSocialBanner];
 }
 
 @end

+ 3 - 1
NIMDemo/NIMDemo/TabBarController.m

@@ -10,6 +10,7 @@
 #import "TabBarController.h"
 #import "AFNetworking/AFNetworking.h"
 #import "NIMKit.h"
+#import "User.h"
 
 @interface TabBarController ()
 
@@ -20,6 +21,8 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
+    
+    [[User sharedInfo] fetchUserInfo:^(UserInfo * _Nonnull userInfo) {}];
 }
 
 - (void)didReceiveMemoryWarning {
@@ -38,7 +41,6 @@
     {
         [self deleteTeam:deleteTeamId];
     }
-    
 }
 
 - (void)deleteTeam:(NSString *)teamId

+ 7 - 1
NIMDemo/NIMDemo/User.h

@@ -28,6 +28,7 @@
 @property (nonatomic, nullable) NSString *city;
 @property (nonatomic, nullable) NSString *district;
 
+@property (nonatomic, strong) UserInfo *userInfo;
 
 //chat
 @property (nonatomic, nullable) NSString *countryRoomId;
@@ -97,6 +98,8 @@
 + (void)showUserInfo:(NSString *_Nullable)userId viewController:(UIViewController *_Nullable)viewController;
 + (void)showUserInfoWithData:(UserInfo *_Nullable)userInfo viewController:(UIViewController *_Nullable)viewController;
 
++ (void)showTeamInfo:(NSString *_Nullable)teamId viewController:(UIViewController *_Nullable)viewController;
+
 - (void)fetchUserInfo:(void (^_Nonnull)(UserInfo * _Nonnull userInfo))callBack;
 
 - (BOOL)isMe:(NSString *_Nullable)userId;
@@ -104,13 +107,16 @@
 - (NSAttributedString *_Nonnull)getUserNameStr:(NIMUser *_Nullable)user;
 - (NSString *_Nullable)getUserName:(NIMUser *_Nullable)nimUser;
 - (UIImage *_Nullable)getGenderImg:(NIMUser *_Nullable)nimUser;
+- (NSString *_Nullable)getDistanceStr:(int)distance;
 
 - (BOOL)isSystemTeam:(NSString *_Nonnull)teamId;
 
 + (UIImage *_Nonnull)defaultUserAvatar;
 + (UIImage *_Nonnull)defaultTeamAvatar;
 + (UIImage *_Nonnull)defaultPlaceHolderImage;
-    
++ (UIImage *_Nonnull)defaultSocialBanner;
+
+
     
 
 

+ 36 - 1
NIMDemo/NIMDemo/User.m

@@ -12,13 +12,14 @@
 #import <CoreLocation/CoreLocation.h>
 #import "UserInfoViewController.h"
 #import "HttpRequest.h"
+#import "GroupInfoViewController.h"
 
 
 
 @interface User()
 
 @property (nonatomic, strong) NSMutableArray<GiftData *> *giftList;
-@property (nonatomic, strong) UserInfo *userInfo;
+
 
 @end
 
@@ -105,6 +106,13 @@ int newCreateTeamId;
     return [NSString stringWithFormat:@"%.0fM", dis];
 }
 
+- (NSString *_Nullable)getDistanceStr:(int)distance{
+    if(distance > 1000)
+        return [NSString stringWithFormat:@"%.1FKM", (float)distance/1000.0];
+    
+    return [NSString stringWithFormat:@"%.0fM", (float)distance];
+}
+
 + (void)showUserInfo:(NSString *)userId viewController:(UIViewController *)viewController{
     
     NSLog(@"showUserInfo %@", userId);
@@ -145,6 +153,22 @@ int newCreateTeamId;
 }
 
 
++ (void)showTeamInfo:(NSString *_Nullable)teamId viewController:(UIViewController *_Nullable)viewController{
+    
+//    if([[User sharedInfo] isSystemTeam:teamId])
+//    {
+//        
+//    }
+//    else
+//    {
+//        
+//    }
+    NIMTeam *team = [[NIMSDK sharedSDK].teamManager teamById:teamId];
+    UIViewController *vc = [[GroupInfoViewController alloc] initWithTeam:team];
+    [viewController.navigationController pushViewController:vc animated:YES];
+}
+
+
 
 - (BOOL)isMe:(NSString *_Nullable)userId{
     if(userId && [userId isEqualToString:[NIMSDK sharedSDK].loginManager.currentAccount])
@@ -440,6 +464,8 @@ int newCreateTeamId;
     return NO;
 }
 
+
+
 + (UIImage *_Nonnull)defaultUserAvatar{
     static UIImage *userAvatar = nil;
     static dispatch_once_t onceToken;
@@ -467,4 +493,13 @@ int newCreateTeamId;
     return placeHolderImage;
 }
 
++ (UIImage *_Nonnull)defaultSocialBanner{
+    static UIImage *bannerImage = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        bannerImage = [UIImage imageNamed:@"群资料_01"];
+    });
+    return bannerImage;
+}
+
 @end

+ 18 - 0
NIMDemo/NIMDemo/UserInfo.h

@@ -25,5 +25,23 @@
 @property (nonatomic, strong) NSString              *realName;
 @property (nonatomic, strong) NSString              *idNumber;
 
+@property (nonatomic, assign) int                   addVerify;
+@property (nonatomic, assign) int                   findMobile;
+@property (nonatomic, assign) int                   findId;
+@property (nonatomic, assign) int                   findNick;
+@property (nonatomic, assign) int                   seeSocial;
+@property (nonatomic, assign) int                   effect;
+
+
+@property (nonatomic, strong) NSString              *socialBanner;
+@property (nonatomic, strong) NSMutableArray        *photeArr;
+
+@property (nonatomic, strong) NSMutableDictionary   *hobbyDict;
+@property (nonatomic, strong) NSString              *hobbyStr;
+
+
+
+
+- (void)updateHobby:(NSString *)hobbyStr;
 
 @end

+ 31 - 0
NIMDemo/NIMDemo/UserInfo.m

@@ -26,9 +26,40 @@
         _showAge = [[data objectForKey:@"show_age"] intValue];
         _realName = [data objectForKey:@"real_name"];
         _idNumber = [data objectForKey:@"id_number"];
+        
+        _socialBanner = [data objectForKey:@"social_banner"];
+        _photeArr = [[data objectForKey:@"photos"] mutableCopy];
+        
+        _addVerify = [[data objectForKey:@"add_verify"] intValue];
+        _findMobile = [[data objectForKey:@"find_mobile"] intValue];
+        _findId = [[data objectForKey:@"find_id"] intValue];
+        _findNick = [[data objectForKey:@"find_nick"] intValue];
+        _seeSocial = [[data objectForKey:@"see_social"] intValue];
+        _effect = [[data objectForKey:@"effect"] intValue];
+        
+        [self updateHobby:[data objectForKey:@"hobby"]];
     }
     return self;
 }
 
 
+- (void)updateHobby:(NSString *)hobbyStr{
+    _hobbyDict = [[NSMutableDictionary alloc] init];
+    NSArray *split = [hobbyStr componentsSeparatedByString:@","];
+    for(int i=0; i<split.count; i++)
+    {
+        NSString *splitStr = [split objectAtIndex:i];
+        [_hobbyDict setObject:splitStr forKey:splitStr];
+        
+        if(i == 0)
+        {
+            _hobbyStr = splitStr;
+        }
+        else if(i == 1)
+        {
+            _hobbyStr = [NSString stringWithFormat:@"%@,%@", _hobbyStr, splitStr];
+        }
+    }
+}
+
 @end

+ 25 - 4
NIMDemo/NIMDemo/UserInfoViewController.m

@@ -18,6 +18,7 @@
 #import "UIView+Toast.h"
 
 @interface UserInfoViewController ()
+@property (weak, nonatomic) IBOutlet UIImageView *bannerImage;
 @property (weak, nonatomic) IBOutlet UIView *avatarContainer;
 @property (weak, nonatomic) IBOutlet UIImageView *genderImage;
 @property (weak, nonatomic) IBOutlet UILabel *nickLabel;
@@ -124,16 +125,31 @@
     _nickLabel.text = [[User sharedInfo] getUserName:_nimUser];
     _idLabel.text = [NSString stringWithFormat:@"ID:%@", _nimUser.userId];
     
-    if(_userInfo.age > 0)
+    if(_userInfo.showAge > 0)
     {
-        _ageLabel.text = [@(_userInfo.age) stringValue];
+        if(_userInfo.age > 0)
+        {
+            _ageLabel.text = [@(_userInfo.age) stringValue];
+        }
+        else
+        {
+            _ageLabel.text = @"未知";
+        }
     }
     else
     {
-        _ageLabel.text = @"未知";
+        _ageLabel.text = @"保密";
     }
     
-    _hobbyLabel.text = @"未知";
+    NSString *hobby = _userInfo.hobbyStr;
+    if(hobby && hobby.length > 0)
+    {
+        _hobbyLabel.text = hobby;
+    }
+    else
+    {
+        _hobbyLabel.text = @"";
+    }
     
     if(_userInfo.city && _userInfo.district && _userInfo.city.length > 0 && _userInfo.district.length > 0)
     {
@@ -150,6 +166,11 @@
     {
         _addressLabel.text = @"未知";
     }
+    
+    
+    NSString *imgURL = _userInfo.socialBanner;
+    url = imgURL && imgURL.length > 0 ? [NSURL URLWithString:imgURL] : nil;
+    [_bannerImage sd_setImageWithURL:url placeholderImage:User.defaultSocialBanner];
 }
 
 

+ 12 - 7
NIMKit/NIMKit/Classes/Sections/SessionList/NIMSessionListViewController.m

@@ -38,13 +38,18 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     
-//    self.view.backgroundColor = [UIColor whiteColor];
-//    self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
-//    [self.view addSubview:self.tableView];
-//    self.tableView.delegate         = self;
-//    self.tableView.dataSource       = self;
-//    self.tableView.tableFooterView  = [[UIView alloc] init];
-//    self.tableView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
+    self.view.backgroundColor = [UIColor whiteColor];
+    
+    float startY = [[UIApplication sharedApplication] statusBarFrame].size.height + self.navigationController.navigationBar.frame.size.height;
+    float tabbarHeight = self.tabBarController.tabBar.frame.size.height;
+    
+    self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
+    [self.view addSubview:self.tableView];
+    self.tableView.contentInset = UIEdgeInsetsMake(startY, 0, tabbarHeight, 0);
+    self.tableView.delegate         = self;
+    self.tableView.dataSource       = self;
+    self.tableView.tableFooterView  = [[UIView alloc] init];
+    self.tableView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
     _recentSessions = [[NIMSDK sharedSDK].conversationManager.allRecentSessions mutableCopy];
     if (!self.recentSessions.count) {
         _recentSessions = [NSMutableArray array];