This commit is contained in:
wu736139669
2015-06-05 17:05:30 +08:00
parent 4145dc7a50
commit 326d5a5645
52 changed files with 2157 additions and 93 deletions
+107
View File
@@ -57,6 +57,7 @@
A95510981AC39E6A0006D16F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A95510971AC39E6A0006D16F /* ViewController.m */; };
A955109B1AC39E6A0006D16F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A95510991AC39E6A0006D16F /* Main.storyboard */; };
A955109D1AC39E6A0006D16F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A955109C1AC39E6A0006D16F /* Images.xcassets */; };
A95CE2EB1B1DFD030017AE68 /* NoteCommentViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A95CE2EA1B1DFD030017AE68 /* NoteCommentViewModel.m */; };
A9617A4F1ACC0D0F0024AE4A /* NoteViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A9617A4E1ACC0D0F0024AE4A /* NoteViewModel.m */; };
A9617A541ACC27860024AE4A /* SetUpViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9617A521ACC27860024AE4A /* SetUpViewController.m */; };
A9617A551ACC27860024AE4A /* SetUpViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9617A531ACC27860024AE4A /* SetUpViewController.xib */; };
@@ -92,6 +93,7 @@
A968627A1ACCF13300DDAA6B /* PSTGridLayoutSection.m in Sources */ = {isa = PBXBuildFile; fileRef = A968626D1ACCF13300DDAA6B /* PSTGridLayoutSection.m */; };
A968627C1ACCF3D200DDAA6B /* cellmorebtnnormalN@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A968627B1ACCF3D200DDAA6B /* cellmorebtnnormalN@2x.png */; };
A968627E1ACCF46E00DDAA6B /* cellmorebtnclickN@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A968627D1ACCF46E00DDAA6B /* cellmorebtnclickN@2x.png */; };
A96F27EE1B2195BA00DA0A66 /* UIImageView+Reloading.m in Sources */ = {isa = PBXBuildFile; fileRef = A96F27ED1B2195BA00DA0A66 /* UIImageView+Reloading.m */; };
A9754A1C1ADC080E0018BAAD /* AudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = A9754A0F1ADC080E0018BAAD /* AudioPlayer.m */; };
A9754A1D1ADC080E0018BAAD /* AutoRecoveringHttpDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = A9754A111ADC080E0018BAAD /* AutoRecoveringHttpDataSource.m */; };
A9754A1E1ADC080E0018BAAD /* CoreFoundationDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = A9754A131ADC080E0018BAAD /* CoreFoundationDataSource.m */; };
@@ -122,6 +124,8 @@
A97559D11ACBF0BC004ADA42 /* btn_share@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A97559CB1ACBF0BC004ADA42 /* btn_share@2x.png */; };
A97883881AD369DF00D46477 /* mainCellDingClick@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A97883871AD369DF00D46477 /* mainCellDingClick@2x.png */; };
A978838A1AD36A0500D46477 /* mainCellDing@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A97883891AD36A0500D46477 /* mainCellDing@2x.png */; };
A97938751B20A63D00180C08 /* UserViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A97938741B20A63D00180C08 /* UserViewModel.m */; };
A97938781B20BB0900180C08 /* CommentViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A97938771B20BB0900180C08 /* CommentViewModel.m */; };
A97C54CD1AC8F10F0038818A /* BaseViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A97C54BD1AC8F10F0038818A /* BaseViewModel.m */; };
A97C54CF1AC8F10F0038818A /* NSString+HXAddtions.m in Sources */ = {isa = PBXBuildFile; fileRef = A97C54C11AC8F10F0038818A /* NSString+HXAddtions.m */; };
A97C54D01AC8F10F0038818A /* PropertyEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = A97C54C31AC8F10F0038818A /* PropertyEntity.m */; };
@@ -187,6 +191,19 @@
A9B4A9541AEDC3620017C655 /* FeedbackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B4A9521AEDC3620017C655 /* FeedbackViewController.m */; };
A9B4A9551AEDC3620017C655 /* FeedbackViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9B4A9531AEDC3620017C655 /* FeedbackViewController.xib */; };
A9B4E39F1AC9908E00A1DBDF /* libMobClickLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B4E39C1AC9908E00A1DBDF /* libMobClickLibrary.a */; };
A9B6DFCC1B1FFDB20003C1BC /* CommentTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B6DFCB1B1FFDB20003C1BC /* CommentTextView.m */; };
A9B6DFD21B20054B0003C1BC /* CommentTextView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFD11B20054B0003C1BC /* CommentTextView.xib */; };
A9B6DFD51B201E4E0003C1BC /* share_cancel_highlighted@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFD31B201E4E0003C1BC /* share_cancel_highlighted@2x.png */; };
A9B6DFD61B201E4E0003C1BC /* share_close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFD41B201E4E0003C1BC /* share_close@2x.png */; };
A9B6DFD91B201E5B0003C1BC /* share_send_highlighted@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFD71B201E5B0003C1BC /* share_send_highlighted@2x.png */; };
A9B6DFDA1B201E5B0003C1BC /* share_send@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFD81B201E5B0003C1BC /* share_send@2x.png */; };
A9B6DFDC1B2023730003C1BC /* recommend_refreshtip_close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFDB1B2023730003C1BC /* recommend_refreshtip_close@2x.png */; };
A9B6DFDE1B2028B80003C1BC /* share_cancel@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFDD1B2028B80003C1BC /* share_cancel@2x.png */; };
A9B6DFE11B202E7D0003C1BC /* comment_support_fake@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFDF1B202E7D0003C1BC /* comment_support_fake@2x.png */; };
A9B6DFE21B202E7D0003C1BC /* comment_support_plus@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFE01B202E7D0003C1BC /* comment_support_plus@2x.png */; };
A9B6DFE41B202E950003C1BC /* night_user_comment_circle@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFE31B202E950003C1BC /* night_user_comment_circle@2x.png */; };
A9B6DFE61B2033A80003C1BC /* toolbar_light_comment@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFE51B2033A80003C1BC /* toolbar_light_comment@2x.png */; };
A9B6DFEC1B2068790003C1BC /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A9B6DFEE1B2068790003C1BC /* Localizable.strings */; };
A9BE23BF1ACD8CA20032171A /* libSocialSina.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9BE23BD1ACD8CA20032171A /* libSocialSina.a */; };
A9CF211C1B1C36D0007490EF /* mainCellCommentClickN@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9CF211A1B1C36D0007490EF /* mainCellCommentClickN@2x.png */; };
A9CF211D1B1C36D0007490EF /* mainCellCommentN@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9CF211B1B1C36D0007490EF /* mainCellCommentN@2x.png */; };
@@ -210,6 +227,8 @@
A9FAD4351AC925AC007ADC10 /* LoginViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A9FAD4341AC925AC007ADC10 /* LoginViewModel.m */; };
A9FD82B71B1D433800AC4DC9 /* accessory@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9FD82B51B1D433800AC4DC9 /* accessory@2x.png */; };
A9FD82B81B1D433800AC4DC9 /* accessoryN@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9FD82B61B1D433800AC4DC9 /* accessoryN@2x.png */; };
A9FD82BC1B1D544300AC4DC9 /* CommentTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A9FD82BA1B1D544300AC4DC9 /* CommentTableViewCell.m */; };
A9FD82BD1B1D544300AC4DC9 /* CommentTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9FD82BB1B1D544300AC4DC9 /* CommentTableViewCell.xib */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -273,6 +292,8 @@
A955109C1AC39E6A0006D16F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
A95510AA1AC39E6A0006D16F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A95510AB1AC39E6A0006D16F /* Ash_AWordTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Ash_AWordTests.m; sourceTree = "<group>"; };
A95CE2E91B1DFD030017AE68 /* NoteCommentViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoteCommentViewModel.h; sourceTree = "<group>"; };
A95CE2EA1B1DFD030017AE68 /* NoteCommentViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NoteCommentViewModel.m; sourceTree = "<group>"; };
A9617A4D1ACC0D0F0024AE4A /* NoteViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoteViewModel.h; sourceTree = "<group>"; };
A9617A4E1ACC0D0F0024AE4A /* NoteViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NoteViewModel.m; sourceTree = "<group>"; };
A9617A511ACC27860024AE4A /* SetUpViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetUpViewController.h; sourceTree = "<group>"; };
@@ -337,6 +358,8 @@
A968626D1ACCF13300DDAA6B /* PSTGridLayoutSection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSTGridLayoutSection.m; sourceTree = "<group>"; };
A968627B1ACCF3D200DDAA6B /* cellmorebtnnormalN@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "cellmorebtnnormalN@2x.png"; sourceTree = "<group>"; };
A968627D1ACCF46E00DDAA6B /* cellmorebtnclickN@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "cellmorebtnclickN@2x.png"; sourceTree = "<group>"; };
A96F27EC1B2195BA00DA0A66 /* UIImageView+Reloading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+Reloading.h"; sourceTree = "<group>"; };
A96F27ED1B2195BA00DA0A66 /* UIImageView+Reloading.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+Reloading.m"; sourceTree = "<group>"; };
A9754A0E1ADC080E0018BAAD /* AudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioPlayer.h; sourceTree = "<group>"; };
A9754A0F1ADC080E0018BAAD /* AudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AudioPlayer.m; sourceTree = "<group>"; };
A9754A101ADC080E0018BAAD /* AutoRecoveringHttpDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoRecoveringHttpDataSource.h; sourceTree = "<group>"; };
@@ -381,6 +404,10 @@
A97559CB1ACBF0BC004ADA42 /* btn_share@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "btn_share@2x.png"; sourceTree = "<group>"; };
A97883871AD369DF00D46477 /* mainCellDingClick@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mainCellDingClick@2x.png"; sourceTree = "<group>"; };
A97883891AD36A0500D46477 /* mainCellDing@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mainCellDing@2x.png"; sourceTree = "<group>"; };
A97938731B20A63D00180C08 /* UserViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserViewModel.h; sourceTree = "<group>"; };
A97938741B20A63D00180C08 /* UserViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserViewModel.m; sourceTree = "<group>"; };
A97938761B20BB0900180C08 /* CommentViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommentViewModel.h; sourceTree = "<group>"; };
A97938771B20BB0900180C08 /* CommentViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommentViewModel.m; sourceTree = "<group>"; };
A97C54BC1AC8F10F0038818A /* BaseViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseViewModel.h; sourceTree = "<group>"; };
A97C54BD1AC8F10F0038818A /* BaseViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseViewModel.m; sourceTree = "<group>"; };
A97C54C01AC8F10F0038818A /* NSString+HXAddtions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+HXAddtions.h"; sourceTree = "<group>"; };
@@ -487,6 +514,21 @@
A9B4E39C1AC9908E00A1DBDF /* libMobClickLibrary.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libMobClickLibrary.a; sourceTree = "<group>"; };
A9B4E39D1AC9908E00A1DBDF /* MobClick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MobClick.h; sourceTree = "<group>"; };
A9B4E39E1AC9908E00A1DBDF /* MobClickSocialAnalytics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MobClickSocialAnalytics.h; sourceTree = "<group>"; };
A9B6DFCA1B1FFDB20003C1BC /* CommentTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommentTextView.h; sourceTree = "<group>"; };
A9B6DFCB1B1FFDB20003C1BC /* CommentTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommentTextView.m; sourceTree = "<group>"; };
A9B6DFD11B20054B0003C1BC /* CommentTextView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CommentTextView.xib; sourceTree = "<group>"; };
A9B6DFD31B201E4E0003C1BC /* share_cancel_highlighted@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "share_cancel_highlighted@2x.png"; sourceTree = "<group>"; };
A9B6DFD41B201E4E0003C1BC /* share_close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "share_close@2x.png"; sourceTree = "<group>"; };
A9B6DFD71B201E5B0003C1BC /* share_send_highlighted@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "share_send_highlighted@2x.png"; sourceTree = "<group>"; };
A9B6DFD81B201E5B0003C1BC /* share_send@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "share_send@2x.png"; sourceTree = "<group>"; };
A9B6DFDB1B2023730003C1BC /* recommend_refreshtip_close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "recommend_refreshtip_close@2x.png"; sourceTree = "<group>"; };
A9B6DFDD1B2028B80003C1BC /* share_cancel@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "share_cancel@2x.png"; sourceTree = "<group>"; };
A9B6DFDF1B202E7D0003C1BC /* comment_support_fake@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "comment_support_fake@2x.png"; sourceTree = "<group>"; };
A9B6DFE01B202E7D0003C1BC /* comment_support_plus@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "comment_support_plus@2x.png"; sourceTree = "<group>"; };
A9B6DFE31B202E950003C1BC /* night_user_comment_circle@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "night_user_comment_circle@2x.png"; sourceTree = "<group>"; };
A9B6DFE51B2033A80003C1BC /* toolbar_light_comment@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "toolbar_light_comment@2x.png"; sourceTree = "<group>"; };
A9B6DFED1B2068790003C1BC /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
A9B6DFEF1B20687B0003C1BC /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
A9BE23BD1ACD8CA20032171A /* libSocialSina.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libSocialSina.a; sourceTree = "<group>"; };
A9BE23BE1ACD8CA20032171A /* UMSocialSinaHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UMSocialSinaHandler.h; sourceTree = "<group>"; };
A9CF211A1B1C36D0007490EF /* mainCellCommentClickN@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mainCellCommentClickN@2x.png"; sourceTree = "<group>"; };
@@ -518,6 +560,9 @@
A9FAD4341AC925AC007ADC10 /* LoginViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewModel.m; sourceTree = "<group>"; };
A9FD82B51B1D433800AC4DC9 /* accessory@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "accessory@2x.png"; sourceTree = "<group>"; };
A9FD82B61B1D433800AC4DC9 /* accessoryN@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "accessoryN@2x.png"; sourceTree = "<group>"; };
A9FD82B91B1D544300AC4DC9 /* CommentTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommentTableViewCell.h; sourceTree = "<group>"; };
A9FD82BA1B1D544300AC4DC9 /* CommentTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommentTableViewCell.m; sourceTree = "<group>"; };
A9FD82BB1B1D544300AC4DC9 /* CommentTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CommentTableViewCell.xib; sourceTree = "<group>"; };
AD3C5DED2445FC2F0892A525 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
E7B8559E65B4108EA2C3F343 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
@@ -603,6 +648,7 @@
A955108F1AC39E6A0006D16F /* Supporting Files */ = {
isa = PBXGroup;
children = (
A9B6DFEE1B2068790003C1BC /* Localizable.strings */,
A95510901AC39E6A0006D16F /* Info.plist */,
A97C54D81AC8FCED0038818A /* PrefixHeader.pch */,
A95510911AC39E6A0006D16F /* main.m */,
@@ -791,6 +837,8 @@
A97559BE1ACBE6C6004ADA42 /* NotePublishViewModel.m */,
A9617A4D1ACC0D0F0024AE4A /* NoteViewModel.h */,
A9617A4E1ACC0D0F0024AE4A /* NoteViewModel.m */,
A95CE2E91B1DFD030017AE68 /* NoteCommentViewModel.h */,
A95CE2EA1B1DFD030017AE68 /* NoteCommentViewModel.m */,
);
path = Note;
sourceTree = "<group>";
@@ -805,6 +853,17 @@
path = Note;
sourceTree = "<group>";
};
A97938721B20A62800180C08 /* Common */ = {
isa = PBXGroup;
children = (
A97938731B20A63D00180C08 /* UserViewModel.h */,
A97938741B20A63D00180C08 /* UserViewModel.m */,
A97938761B20BB0900180C08 /* CommentViewModel.h */,
A97938771B20BB0900180C08 /* CommentViewModel.m */,
);
path = Common;
sourceTree = "<group>";
};
A97C54B71AC8F0370038818A /* ViewControllers */ = {
isa = PBXGroup;
children = (
@@ -821,6 +880,7 @@
A97C54B81AC8F0370038818A /* ViewModels */ = {
isa = PBXGroup;
children = (
A97938721B20A62800180C08 /* Common */,
A99AA1271ADCCB3100574B12 /* Message */,
A94D0EDA1AD5753A0002DEB1 /* My */,
A97559BC1ACBE6B7004ADA42 /* Note */,
@@ -918,6 +978,8 @@
A97C54DE1AC91D990038818A /* Tool */ = {
isa = PBXGroup;
children = (
A96F27EC1B2195BA00DA0A66 /* UIImageView+Reloading.h */,
A96F27ED1B2195BA00DA0A66 /* UIImageView+Reloading.m */,
A97C54DF1AC91DA10038818A /* CommonUtil.h */,
A97C54E01AC91DA10038818A /* CommonUtil.m */,
A93441DC1ACA311700A6B233 /* Ash_UIUtil.h */,
@@ -929,6 +991,10 @@
A97C54E21AC91FD70038818A /* Resource */ = {
isa = PBXGroup;
children = (
A9B6DFE51B2033A80003C1BC /* toolbar_light_comment@2x.png */,
A9B6DFE31B202E950003C1BC /* night_user_comment_circle@2x.png */,
A9B6DFDF1B202E7D0003C1BC /* comment_support_fake@2x.png */,
A9B6DFE01B202E7D0003C1BC /* comment_support_plus@2x.png */,
A9FD82B51B1D433800AC4DC9 /* accessory@2x.png */,
A9FD82B61B1D433800AC4DC9 /* accessoryN@2x.png */,
A9CF21291B1C65A2007490EF /* praise-wall-white@2x.png */,
@@ -1003,6 +1069,12 @@
A93441E41ACA8AC400A6B233 /* Profile_filter_contentIconClick@2x.png */,
A93441DF1ACA89AA00A6B233 /* Profile_filter_voiceIcon@2x.png */,
A93441E01ACA89AA00A6B233 /* Profile_filter_voiceIconClick@2x.png */,
A9B6DFDB1B2023730003C1BC /* recommend_refreshtip_close@2x.png */,
A9B6DFD31B201E4E0003C1BC /* share_cancel_highlighted@2x.png */,
A9B6DFD41B201E4E0003C1BC /* share_close@2x.png */,
A9B6DFD71B201E5B0003C1BC /* share_send_highlighted@2x.png */,
A9B6DFD81B201E5B0003C1BC /* share_send@2x.png */,
A9B6DFDD1B2028B80003C1BC /* share_cancel@2x.png */,
);
path = Resource;
sourceTree = "<group>";
@@ -1170,6 +1242,12 @@
A9CF21241B1C53E3007490EF /* CommentGoodListCellTableViewCell.h */,
A9CF21251B1C53E3007490EF /* CommentGoodListCellTableViewCell.m */,
A9CF21261B1C53E3007490EF /* CommentGoodListCellTableViewCell.xib */,
A9FD82B91B1D544300AC4DC9 /* CommentTableViewCell.h */,
A9FD82BA1B1D544300AC4DC9 /* CommentTableViewCell.m */,
A9FD82BB1B1D544300AC4DC9 /* CommentTableViewCell.xib */,
A9B6DFCA1B1FFDB20003C1BC /* CommentTextView.h */,
A9B6DFCB1B1FFDB20003C1BC /* CommentTextView.m */,
A9B6DFD11B20054B0003C1BC /* CommentTextView.xib */,
);
path = Common;
sourceTree = "<group>";
@@ -1296,6 +1374,7 @@
A9EA14C31B02E88300357529 /* LaunchScreen.xib in Resources */,
A9CF211D1B1C36D0007490EF /* mainCellCommentN@2x.png in Resources */,
A93441FA1ACA919500A6B233 /* tabbarQuotation-dark@2x.png in Resources */,
A9B6DFE21B202E7D0003C1BC /* comment_support_plus@2x.png in Resources */,
A97559D01ACBF0BC004ADA42 /* btn_share_clicked@2x.png in Resources */,
A90BA01F1AD606AE00728393 /* voice-record-icon@2x.png in Resources */,
A9E2711B1ADB97ED000B1542 /* Default-568h.png in Resources */,
@@ -1317,11 +1396,14 @@
A99AA12F1ADD028400574B12 /* Icon120.png in Resources */,
A98536821AEBC7BB000312BF /* SetUserInfoViewController.xib in Resources */,
A97C55071AC933AD0038818A /* UMSShareListController.xib in Resources */,
A9B6DFD91B201E5B0003C1BC /* share_send_highlighted@2x.png in Resources */,
A93441EE1ACA8C8F00A6B233 /* defaultUserIcon@2x.png in Resources */,
A97559AC1ACB9DF0004ADA42 /* navigationButtonRefresh@2x.png in Resources */,
A90BA0181AD6067F00728393 /* voice-continue-record-bg@2x.png in Resources */,
A90BA0081AD6060600728393 /* playButton@2x.png in Resources */,
A9B6DFD61B201E4E0003C1BC /* share_close@2x.png in Resources */,
A97C54FE1AC933AD0038818A /* UMSocialLocalizable.strings in Resources */,
A9B6DFD51B201E4E0003C1BC /* share_cancel_highlighted@2x.png in Resources */,
A93441E91ACA8AD200A6B233 /* Profile_filter_ImageIcon@2x.png in Resources */,
A97C55041AC933AD0038818A /* UMShareEditViewControlleriPad.xib in Resources */,
A978838A1AD36A0500D46477 /* mainCellDing@2x.png in Resources */,
@@ -1330,11 +1412,14 @@
A9617A591ACC2EBC0024AE4A /* mine-setting-icon@2x.png in Resources */,
A968627C1ACCF3D200DDAA6B /* cellmorebtnnormalN@2x.png in Resources */,
A93442041ACA981D00A6B233 /* Default@2x.png in Resources */,
A9B6DFE11B202E7D0003C1BC /* comment_support_fake@2x.png in Resources */,
A97DBE401ACAE29E00705682 /* Icon@2x.png in Resources */,
A90BA00A1AD6060600728393 /* playButtonPause@2x.png in Resources */,
A97DBE481ACAE7F600705682 /* smalliconWeixin@2x.png in Resources */,
A97DBE441ACAE61400705682 /* first-login-qq@2x.png in Resources */,
A9B6DFDC1B2023730003C1BC /* recommend_refreshtip_close@2x.png in Resources */,
A9FAD42D1AC923E2007ADC10 /* MessageViewController.xib in Resources */,
A9B6DFE41B202E950003C1BC /* night_user_comment_circle@2x.png in Resources */,
A9B4A9551AEDC3620017C655 /* FeedbackViewController.xib in Resources */,
A98F986C1ACA2FA9007C4594 /* BaseRefreshViewController.xib in Resources */,
A955109D1AC39E6A0006D16F /* Images.xcassets in Resources */,
@@ -1356,6 +1441,7 @@
A97559A81ACB9DE4004ADA42 /* navigationButtonPublish@2x.png in Resources */,
A98536781AEB7400000312BF /* RegistAccountViewController.xib in Resources */,
A97559CE1ACBF0BC004ADA42 /* btn_good_clicked@2x.png in Resources */,
A9B6DFE61B2033A80003C1BC /* toolbar_light_comment@2x.png in Resources */,
A97883881AD369DF00D46477 /* mainCellDingClick@2x.png in Resources */,
A90BA0211AD606B400728393 /* voice-record-level@2x.png in Resources */,
A950AB401AEC8B5E00D0F6DD /* closeButton@2x.png in Resources */,
@@ -1366,7 +1452,9 @@
A9CF21221B1C4C70007490EF /* NoteCommentViewController.xib in Resources */,
A97559CD1ACBF0BC004ADA42 /* btn_bad@2x.png in Resources */,
A93441F71ACA918100A6B233 /* tabbarSetup@2x.png in Resources */,
A9B6DFDE1B2028B80003C1BC /* share_cancel@2x.png in Resources */,
A90BA0091AD6060600728393 /* playButtonClick@2x.png in Resources */,
A9FD82BD1B1D544300AC4DC9 /* CommentTableViewCell.xib in Resources */,
A98536731AEB66F9000312BF /* ReportViewController.xib in Resources */,
A97C55011AC933AD0038818A /* UMSCommentInputController.xib in Resources */,
A97559AD1ACB9DF0004ADA42 /* navigationButtonRefreshClick@2x.png in Resources */,
@@ -1374,12 +1462,15 @@
A90BA0131AD6066000728393 /* voice-bottom-close@2x.png in Resources */,
A93441F81ACA918100A6B233 /* tabbarSetupClick@2x.png in Resources */,
A93441FE1ACA919F00A6B233 /* tabbarVoice-dark@2x.png in Resources */,
A9B6DFDA1B201E5B0003C1BC /* share_send@2x.png in Resources */,
A9B6DFD21B20054B0003C1BC /* CommentTextView.xib in Resources */,
A9617A581ACC2EBC0024AE4A /* mine-setting-icon-click@2x.png in Resources */,
A985368C1AEBDDAB000312BF /* ModifyPassWordViewController.xib in Resources */,
A90BA0071AD6060600728393 /* play@2x.png in Resources */,
A93441E51ACA8AC400A6B233 /* Profile_filter_contentIcon@2x.png in Resources */,
A97559B31ACBC683004ADA42 /* NotePublishViewController.xib in Resources */,
A966FB991AD62CAE00542068 /* checkmark@2x.png in Resources */,
A9B6DFEC1B2068790003C1BC /* Localizable.strings in Resources */,
A9FAD4231AC922A5007ADC10 /* MainViewController.xib in Resources */,
A90BA01D1AD606A700728393 /* voice-record-bg@2x.png in Resources */,
A90BA0231AD619B500728393 /* voice-record-level-bg@2x.png in Resources */,
@@ -1447,6 +1538,7 @@
A9754A221ADC080E0018BAAD /* LocalFileDataSource.m in Sources */,
A97559BF1ACBE6C6004ADA42 /* NotePublishViewModel.m in Sources */,
A96862781ACCF13300DDAA6B /* PSTGridLayoutItem.m in Sources */,
A97938781B20BB0900180C08 /* CommentViewModel.m in Sources */,
A97559B21ACBC683004ADA42 /* NotePublishViewController.m in Sources */,
A9754A1F1ADC080E0018BAAD /* DataSource.m in Sources */,
A97C54DD1AC901980038818A /* MBProgressHUD+Util.m in Sources */,
@@ -1464,6 +1556,7 @@
A96862761ACCF13300DDAA6B /* PSTCollectionViewUpdateItem.m in Sources */,
A968626E1ACCF13300DDAA6B /* NSIndexPath+PSTCollectionViewAdditions.m in Sources */,
A9FAD42C1AC923E2007ADC10 /* MessageViewController.m in Sources */,
A97938751B20A63D00180C08 /* UserViewModel.m in Sources */,
A985367C1AEB8F89000312BF /* RegistInfoViewController.m in Sources */,
A9CF21271B1C53E3007490EF /* CommentGoodListCellTableViewCell.m in Sources */,
A98536811AEBC7BB000312BF /* SetUserInfoViewController.m in Sources */,
@@ -1507,9 +1600,13 @@
A9FAD4351AC925AC007ADC10 /* LoginViewModel.m in Sources */,
A98536861AEBDA1E000312BF /* OurLoginViewController.m in Sources */,
A95510921AC39E6A0006D16F /* main.m in Sources */,
A95CE2EB1B1DFD030017AE68 /* NoteCommentViewModel.m in Sources */,
A98D659D1AD37F18008668EE /* MessageTableViewCell.m in Sources */,
A96862711ACCF13300DDAA6B /* PSTCollectionViewController.m in Sources */,
A96862431ACCF0B400DDAA6B /* MWCaptionView.m in Sources */,
A9FD82BC1B1D544300AC4DC9 /* CommentTableViewCell.m in Sources */,
A9B6DFCC1B1FFDB20003C1BC /* CommentTextView.m in Sources */,
A96F27EE1B2195BA00DA0A66 /* UIImageView+Reloading.m in Sources */,
A9B4A9541AEDC3620017C655 /* FeedbackViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -1534,6 +1631,16 @@
name = UMSocialLocalizable.strings;
sourceTree = "<group>";
};
A9B6DFEE1B2068790003C1BC /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
A9B6DFED1B2068790003C1BC /* zh-Hans */,
A9B6DFEF1B20687B0003C1BC /* en */,
);
name = Localizable.strings;
path = Resource;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
@@ -51,22 +51,6 @@
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Utility/Network/PropertyEntity.m"
timestampString = "449572113.825005"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "43"
endingLineNumber = "43"
landmarkName = "-encodePro"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
@@ -74,7 +58,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/ViewControllers/Main/NoteViewController.m"
timestampString = "451816790.449978"
timestampString = "455182245.754147"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "227"
@@ -234,11 +218,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.m"
timestampString = "449640296.454354"
timestampString = "455099392.498703"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1455"
endingLineNumber = "1455"
startingLineNumber = "1456"
endingLineNumber = "1456"
landmarkName = "-actionButtonPressed:"
landmarkType = "5">
</BreakpointContent>
@@ -665,11 +649,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Views/Note/NoteTableViewCell.m"
timestampString = "454903615.072925"
timestampString = "455187738.062961"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "154"
endingLineNumber = "154"
startingLineNumber = "168"
endingLineNumber = "168"
landmarkName = "-setText_Image:"
landmarkType = "5">
</BreakpointContent>
@@ -729,11 +713,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Pods/MBProgressHUD/MBProgressHUD.m"
timestampString = "451831263.244579"
timestampString = "455129096.335702"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "635"
endingLineNumber = "635"
startingLineNumber = "639"
endingLineNumber = "639"
landmarkName = "-drawRect:"
landmarkType = "5">
</BreakpointContent>
@@ -1577,11 +1561,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Views/Note/NoteTableViewCell.m"
timestampString = "454903615.072925"
timestampString = "455187738.062961"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "165"
endingLineNumber = "165"
startingLineNumber = "179"
endingLineNumber = "179"
landmarkName = "-canPerformAction:withSender:"
landmarkType = "5">
</BreakpointContent>
@@ -1705,7 +1689,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/ViewControllers/Main/NoteViewController.m"
timestampString = "454337336.032283"
timestampString = "455182245.754147"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "296"
@@ -1721,7 +1705,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/ViewControllers/Main/NoteViewController.m"
timestampString = "454337336.032283"
timestampString = "455182245.754147"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "279"
@@ -1737,7 +1721,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/ViewControllers/Main/NoteViewController.m"
timestampString = "454337336.032283"
timestampString = "455182245.754147"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "274"
@@ -1753,12 +1737,12 @@
moduleName = "Ash_AWord"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/xmfish/Documents/Ash_Soft/Ash_AWord/Ash_AWord/ViewControllers/Main/NoteViewController.m"
timestampString = "454337074.055901"
timestampString = "455187536.087896"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "274"
endingLineNumber = "274"
offsetFromSymbolStart = "64">
offsetFromSymbolStart = "51">
</Location>
<Location
shouldBeEnabled = "Yes"
@@ -1768,7 +1752,7 @@
moduleName = "Ash_AWord"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/xmfish/Documents/Ash_Soft/Ash_AWord/Ash_AWord/ViewControllers/Main/NoteViewController.m"
timestampString = "454337074.056061"
timestampString = "455187536.088105"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "274"
@@ -1778,5 +1762,485 @@
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.m"
timestampString = "455099392.498703"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "198"
endingLineNumber = "198"
landmarkName = "-viewDidLoad"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.m"
timestampString = "455099392.498703"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1432"
endingLineNumber = "1432"
landmarkName = "-doneButtonPressed:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWZoomingScrollView.m"
timestampString = "455186870.912233"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "360"
endingLineNumber = "360"
landmarkName = "-handleSingleTap:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.m"
timestampString = "455099392.498703"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1476"
endingLineNumber = "1476"
landmarkName = "-actionButtonPressed:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.m"
timestampString = "455099392.498703"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1499"
endingLineNumber = "1499"
landmarkName = "-actionButtonPressed:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.m"
timestampString = "455099392.498703"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1484"
endingLineNumber = "1484"
landmarkName = "-actionButtonPressed:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.m"
timestampString = "455099392.498703"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1488"
endingLineNumber = "1488"
landmarkName = "-actionButtonPressed:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.m"
timestampString = "455099392.498703"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1479"
endingLineNumber = "1479"
landmarkName = "-actionButtonPressed:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.m"
timestampString = "455099810.218446"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1625"
endingLineNumber = "1625"
landmarkName = "-copyPhoto"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWZoomingScrollView.m"
timestampString = "455186870.912233"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "391"
endingLineNumber = "391"
landmarkName = "-imageView:singleTapDetected:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhotoBrowser.m"
timestampString = "455099392.498703"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "466"
endingLineNumber = "466"
landmarkName = "-storePreviousNavBarAppearance"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Views/Common/CommentTextView.m"
timestampString = "455127399.182315"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "26"
endingLineNumber = "26"
landmarkName = "-bgBtnClick:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Views/Common/CommentTextView.m"
timestampString = "455170038.377618"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "145"
endingLineNumber = "145"
landmarkName = "-dealloc"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Views/Common/CommentTextView.m"
timestampString = "455170038.377618"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "121"
endingLineNumber = "121"
landmarkName = "-comment"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Views/Common/CommentTextView.m"
timestampString = "455170038.377618"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "119"
endingLineNumber = "119"
landmarkName = "-comment"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Views/Common/CommentTextView.m"
timestampString = "455170038.377618"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "117"
endingLineNumber = "117"
landmarkName = "-comment"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Utility/Network/RequireEngine.m"
timestampString = "455171075.546413"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "91"
endingLineNumber = "91"
landmarkName = "+requireWithProperty:completionBlock:failedBlock:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Utility/Network/RequireEngine.m"
timestampString = "455171076.43425"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "94"
endingLineNumber = "94"
landmarkName = "+requireWithProperty:completionBlock:failedBlock:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Utility/Network/RequireEngine.m"
timestampString = "455171077.658188"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "93"
endingLineNumber = "93"
landmarkName = "+requireWithProperty:completionBlock:failedBlock:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Views/Common/CommentTableViewCell.m"
timestampString = "455176596.969698"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "31"
endingLineNumber = "31"
landmarkName = "-setCommentInfoViewModel:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Utility/Tool/UIImageView+Reloading.m"
timestampString = "455184836.765948"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "223"
endingLineNumber = "223"
landmarkName = "-reloadImageURL"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Pods/SDWebImage/SDWebImage/UIImageView+WebCache.m"
timestampString = "455177586.690605"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "90"
endingLineNumber = "90"
landmarkName = "-sd_imageURL"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Pods/SDWebImage/SDWebImage/UIImageView+WebCache.m"
timestampString = "455177588.485831"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "138"
endingLineNumber = "138"
landmarkName = "-imageURL"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWZoomingScrollView.m"
timestampString = "455186748.183707"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "118"
endingLineNumber = "118"
landmarkName = "-displayImage"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Vender/MWPhotoBrowser/MWPhotoBrowser/Classes/MWZoomingScrollView.m"
timestampString = "455186870.912233"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "422"
endingLineNumber = "422"
landmarkName = "-view:singleTapDetected:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Utility/Tool/UIImageView+Reloading.m"
timestampString = "455186943.797918"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "68"
endingLineNumber = "68"
landmarkName = "-sy_progressView:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Utility/Tool/UIImageView+Reloading.m"
timestampString = "455187141.673951"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "241"
endingLineNumber = "241"
landmarkName = "-reloadImageURL"
landmarkType = "5">
<Locations>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "__33-[UIImageView(SY) reloadImageURL]_block_invoke122"
moduleName = "Ash_AWord"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/xmfish/Documents/Ash_Soft/Ash_AWord/Ash_AWord/Utility/Tool/UIImageView+Reloading.m"
timestampString = "455187536.104458"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "241"
endingLineNumber = "241"
offsetFromSymbolStart = "27">
</Location>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "__33-[UIImageView(SY) reloadImageURL]_block_invoke122"
moduleName = "Ash_AWord"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/xmfish/Documents/Ash_Soft/Ash_AWord/Ash_AWord/Utility/Tool/UIImageView+Reloading.m"
timestampString = "455187536.104893"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "241"
endingLineNumber = "241"
offsetFromSymbolStart = "34">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Utility/Tool/UIImageView+Reloading.m"
timestampString = "455187738.062961"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "322"
endingLineNumber = "322"
landmarkName = "-sy_handleTapEvent:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
+3
View File
@@ -95,4 +95,7 @@
*/
#define NEWIMAGE_SIZE 700.f
#define DefaultUserIcon [UIImage imageNamed:@"defaultUserIcon"]
#define DefaultPageSize 20
#endif
+1
View File
@@ -38,6 +38,7 @@
#import "SVWebViewController.h"
#import "MobClick.h"
#import "LoginViewController.h"
#import "UIImageView+Reloading.h"
#endif
#endif
Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@@ -0,0 +1,10 @@
/*
Localizable.strings
Ash_AWord
Created by xmfish on 15/6/4.
Copyright (c) 2015年 ash. All rights reserved.
*/
"Saving" = "Saving";
"SaveFailed" = "SaveFailed";
"Saved" = "Saved";
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,11 @@
/*
Localizable.strings
Ash_AWord
Created by xmfish on 15/6/4.
Copyright (c) 2015年 ash. All rights reserved.
*/
"Saving" = "保存中";
"SaveFailed" = "保存失败";
"Saved" = "保存成功";
+2
View File
@@ -10,6 +10,8 @@
@interface Ash_UIUtil : NSObject
+(CABasicAnimation*)getrotationAnimation;
+(CGSize)downloadImageSizeWithURL:(id)imageURL;
/**
* 通过类名出创建xib类
+13
View File
@@ -10,6 +10,19 @@
@implementation Ash_UIUtil
+(CABasicAnimation*)getrotationAnimation
{
CABasicAnimation* rotationAnimation;
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 2.0 ];
[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
rotationAnimation.duration = 1.0;
rotationAnimation.repeatCount = MAXFLOAT;//你可以设置到最大的整数值
rotationAnimation.cumulative = NO;
rotationAnimation.removedOnCompletion = NO;
rotationAnimation.fillMode = kCAFillModeForwards;
return rotationAnimation;
}
//讨厌警告
-(id)diskImageDataBySearchingAllPathsForKey:(id)key{return nil;}
+(CGSize)downloadImageSizeWithURL:(id)imageURL
+6 -6
View File
@@ -184,7 +184,7 @@
NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
// [formatter setDateStyle:NSDateFormatterMediumStyle];
// [formatter setTimeStyle:NSDateFormatterShortStyle];
[formatter setDateFormat:@"yyyy-MM-dd"];
[formatter setDateFormat:@"yyyy-MM-dd HH:MM:ss"];
NSDate * d = [NSDate dateWithTimeIntervalSince1970:[timeSp floatValue]/1000];
NSTimeInterval late = [d timeIntervalSince1970];
@@ -218,11 +218,11 @@
if (cha/3600 > 1 && cha/86400 < 1) {
timeString = [NSString stringWithFormat:@"%f", cha/3600];
timeString = [timeString substringToIndex:timeString.length-7];
timeString = [NSString stringWithFormat:@"%@小时前", timeString];
// timeString = [NSString stringWithFormat:@"%f", cha/3600];
//
// timeString = [timeString substringToIndex:timeString.length-7];
//
// timeString = [NSString stringWithFormat:@"%@小时前", timeString];
}
@@ -0,0 +1,32 @@
//
// UIImageViewReloading.h
// XiaoYu
// 可以显示进度,还可以失败重新下载
// Created by xmfish on 14-8-21.
// Copyright (c) 2014年 Benson. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "UIImageView+WebCache.h"
typedef NS_ENUM(NSInteger, LKImageViewStatus){
LKImageViewStatusNone = 0,
LKImageViewStatusLoaded = 1,
LKImageViewStatusLoading = 2,
LKImageViewStatusFail = 3
};
@interface UIImageView(Reloading)
//加载的图片 url地址 可以是 NSString 或 NSURL
@property(copy, nonatomic) id imageURL;
//这个不会设置 image 只会保存ImageURL
- (void)setImageURLFromCache:(id)imageURL;
//当前状态
@property LKImageViewStatus status;
//图片点击事件 不用再手动添加UITapGestureRecognizer
@property(copy, nonatomic) void(^onTouchTapBlock)(UIImageView *imageView);
//重新加载图片
- (void)reloadImageURL;
@end
@@ -0,0 +1,335 @@
//
// UIImageViewReloading.m
// XiaoYu
//
// Created by xmfish on 14-8-21.
// Copyright (c) 2014年 Benson. All rights reserved.
//
#import "UIImageView+Reloading.h"
#import <execinfo.h>
#import <objc/runtime.h>
#import <objc/message.h>
@implementation NSObject (Swizzle)
+ (BOOL)jr_swizzleMethod:(SEL)origSel_ withMethod:(SEL)altSel_ error:(NSError**)error_ {
Method origMethod = class_getInstanceMethod(self, origSel_);
if (!origMethod) {
return NO;
}
Method altMethod = class_getInstanceMethod(self, altSel_);
if (!altMethod) {
return NO;
}
class_addMethod(self,
origSel_,
class_getMethodImplementation(self, origSel_),
method_getTypeEncoding(origMethod));
class_addMethod(self,
altSel_,
class_getMethodImplementation(self, altSel_),
method_getTypeEncoding(altMethod));
method_exchangeImplementations(class_getInstanceMethod(self, origSel_), class_getInstanceMethod(self, altSel_));
return YES;
}
+ (BOOL)jr_swizzleClassMethod:(SEL)origSel_ withClassMethod:(SEL)altSel_ error:(NSError**)error_ {
return [object_getClass((id)self) jr_swizzleMethod:origSel_ withMethod:altSel_ error:error_];
}
@end
static char imageURLKey;
static char imageStatusKey;
static char imageTapEventKey;
static char imageOriginalModelKey;
@implementation UIImageView (SY)
+ (void)load
{
[UIImageView jr_swizzleMethod:@selector(cancelCurrentImageLoad) withMethod:@selector(sy_cancelCurrentImageLoad) error:nil];
}
- (UIButton *)sy_progressView:(BOOL)isCreate
{
static char imageProgressKey;
UIButton *progressView = objc_getAssociatedObject(self, &imageProgressKey);
if (isCreate)
{
if (progressView == nil)
{
progressView = [UIButton buttonWithType:UIButtonTypeCustom];
progressView.frame = self.bounds;
progressView.hidden = YES;
progressView.backgroundColor = [UIColor clearColor];
[progressView setTitle:@"点击加载图片" forState:UIControlStateNormal];
[progressView setTitle:@"图片加载中" forState:UIControlStateDisabled];
progressView.titleLabel.shadowColor = [UIColor whiteColor];
progressView.titleLabel.shadowOffset = CGSizeMake(1, 1);
[progressView setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
[progressView setTitleColor:[UIColor lightGrayColor] forState:UIControlStateDisabled];
progressView.titleLabel.adjustsFontSizeToFitWidth = YES;
// CGSize size = CGSizeMake(progressView.frame.size.width,2000);
// CGSize labelsize = [progressView.titleLabel.text sizeWithFont:progressView.titleLabel.font constrainedToSize:size lineBreakMode:NSLineBreakByCharWrapping];
// progressView.frame = CGRectMake(0.0, 0.0, self.bounds.size.width, self.bounds.size.height);
progressView.center = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2);
[progressView addTarget:self action:@selector(reloadImageURL) forControlEvents:UIControlEventTouchUpInside];
progressView.enabled = NO;
objc_setAssociatedObject(self, &imageProgressKey, progressView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
__weak UIImageView* wself = self;
dispatch_async(dispatch_get_main_queue(), ^{
[wself addSubview:progressView];
});
}
return progressView;
}
- (UIViewContentMode)originalViewContentMode
{
NSNumber *value = objc_getAssociatedObject(self, &imageOriginalModelKey);
int mode = -1;
if (value)
{
mode = [value intValue];
}
if (mode < 0 || mode > UIViewContentModeBottomRight)
{
return -1;
}
else
{
return mode;
}
}
- (void)setOriginalViewContentMode:(UIViewContentMode)originalViewContentMode
{
NSNumber *value = [[NSNumber alloc] initWithInt:originalViewContentMode];
objc_setAssociatedObject(self, &imageOriginalModelKey, value, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (LKImageViewStatus)status
{
NSNumber *value = objc_getAssociatedObject(self, &imageStatusKey);
if (value)
{
return [value intValue];
}
return LKImageViewStatusNone;
}
- (void)setStatus:(LKImageViewStatus)status
{
objc_setAssociatedObject(self, &imageStatusKey, @(status), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (void)setImageURLFromCache:(id)imageURL
{
[self sy_loadTapEvent];
self.status = LKImageViewStatusLoaded;
objc_setAssociatedObject(self, &imageURLKey, imageURL, OBJC_ASSOCIATION_COPY_NONATOMIC);
}
- (void)setImageURL:(id)imageURL
{
[self sy_loadTapEvent];
objc_setAssociatedObject(self, &imageURLKey, imageURL, OBJC_ASSOCIATION_COPY_NONATOMIC);
if (imageURL)
{
[self reloadImageURL];
}
else
{
[self sy_cancelCurrentImageLoad];
self.image = nil;
self.backgroundColor = [UIColor colorWithRed:233/255.0 green:228/255.0 blue:223/255.0 alpha:1];
self.status = LKImageViewStatusNone;
UIButton *pv = [self sy_progressView:NO];
[pv removeFromSuperview];
}
}
- (void)sy_loadTapEvent
{
static char tapEventLoadedKey;
id loaded = objc_getAssociatedObject(self, &tapEventLoadedKey);
if (loaded == nil)
{
self.userInteractionEnabled = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(sy_handleTapEvent:)];
[self addGestureRecognizer:tap];
objc_setAssociatedObject(self, &tapEventLoadedKey, @(YES), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
}
- (id)getImageURL
{
return objc_getAssociatedObject(self, &imageURLKey);
}
- (void)sy_cancelCurrentImageLoad
{
if ([self getImageURL])
{
void *callstack[2];
int frames = backtrace(callstack, 2);
char **strs = backtrace_symbols(callstack, 2);
NSString *func_name = nil;
if (frames > 1 && strs && strs[1])
{
func_name = [NSString stringWithUTF8String:strs[1]];
}
free(strs);
//如果从外部调用 cancelImageLoad 才进行扫尾工作
if ([func_name rangeOfString:@"UIImageView(WebCache)"].length == 0)
{
UIButton *pv = [self sy_progressView:NO];
// pv.hidden = YES;
[pv removeFromSuperview];
self.status = LKImageViewStatusNone;
}
}
[self sy_cancelCurrentImageLoad];
}
- (void)reloadImageURL
{
id imageURL = [self getImageURL];
if ([imageURL isKindOfClass:[NSString class]])
{
if ([imageURL isEqualToString:@""] == NO)
{
imageURL = [NSURL URLWithString:imageURL];
}
}
if ([imageURL isKindOfClass:[NSURL class]] == NO)
{
return;
}
[self sy_cancelCurrentImageLoad];
self.image = nil;
self.backgroundColor = [UIColor colorWithRed:233/255.0 green:228/255.0 blue:223/255.0 alpha:1];
__weak UIImageView *wself = self;
if([self originalViewContentMode] < 0){
[self setOriginalViewContentMode:self.contentMode];
}
self.contentMode = UIViewContentModeScaleAspectFill;
self.status = LKImageViewStatusLoading;
__weak __block UIButton *pv = [self sy_progressView:YES];
dispatch_async(dispatch_get_main_queue(), ^{
pv.hidden = NO;
pv.enabled = NO;
});
[self sd_setImageWithURL:imageURL placeholderImage:self.image options:SDWebImageRetryFailed progress:^(NSInteger receivedSize, NSInteger expectedSize) {
float pvalue = MAX(0, MIN(1, receivedSize / (float) expectedSize));
dispatch_async(dispatch_get_main_queue(), ^{
// [pv.titleLabel setText:[NSString stringWithFormat:@"图片加载中%.1f %%",pvalue*100]];
pv.center = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2);
[pv setTitle:[NSString stringWithFormat:@"图片加载中%.1f %%",pvalue*100] forState:UIControlStateDisabled];
pv.hidden = NO;
});
} completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
if(!pv){
pv = [wself sy_progressView:NO];
}
if (image)
{
pv.hidden = YES;
dispatch_async(dispatch_get_main_queue(), ^{
[pv removeFromSuperview];
});
if([wself originalViewContentMode]>=0){
if(wself.contentMode != [wself originalViewContentMode]){
wself.contentMode = [wself originalViewContentMode];
[wself setNeedsDisplay];
}
}
else if (wself.contentMode != UIViewContentModeScaleAspectFill)
{
wself.contentMode = UIViewContentModeScaleAspectFill;
[wself setNeedsDisplay];
}
wself.status = LKImageViewStatusLoaded;
wself.backgroundColor = [UIColor clearColor];
[wself setOriginalViewContentMode:-1];
}
else
{
if (error)
{
wself.status = LKImageViewStatusFail;
[wself setOriginalViewContentMode:-1];
dispatch_async(dispatch_get_main_queue(), ^{
pv.enabled = YES;
});
}
}
}];
}
- (void)setOnTouchTapBlock:(void (^)(UIImageView *))onTouchTapBlock
{
[self sy_loadTapEvent];
objc_setAssociatedObject(self, &imageTapEventKey, onTouchTapBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
}
- (void (^)(UIImageView *))onTouchTapBlock
{
return objc_getAssociatedObject(self, &imageTapEventKey);
}
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
{
if ([self getImageURL] && self.status != LKImageViewStatusFail && self.onTouchTapBlock == nil)
{
return NO;
}
if (self.status == LKImageViewStatusLoading || self.status == LKImageViewStatusFail) {
UIButton* pv = [self sy_progressView:NO];
if (self.status == LKImageViewStatusFail && [pv pointInside:[self convertPoint:point toView:pv] withEvent:event]) {
return YES;
}
return NO;
}
return [super pointInside:point withEvent:event];
}
- (void)sy_handleTapEvent:(UITapGestureRecognizer *)sender
{
switch (self.status)
{
case LKImageViewStatusFail:
[self reloadImageURL];
break;
default:
if (self.onTouchTapBlock)
{
self.onTouchTapBlock(self);
}
break;
}
}
@end
@@ -68,4 +68,5 @@
- (void)showNextPhotoAnimated:(BOOL)animated;
- (void)showPreviousPhotoAnimated:(BOOL)animated;
-(void)didSavePhoto;
@end
@@ -173,6 +173,7 @@
_toolbar.barStyle = UIBarStyleBlackTranslucent;
_toolbar.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth;
// Toolbar Items
if (self.displayNavArrows) {
NSString *arrowPathFormat;
@@ -202,7 +203,6 @@
// Super
[super viewDidLoad];
}
- (void)performLayout {
@@ -392,6 +392,7 @@
}
_viewHasAppearedInitially = YES;
}
self.navigationController.navigationBarHidden = YES;
}
@@ -1502,13 +1503,13 @@
self.activityViewController = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:nil];
// Show loading spinner after a couple of seconds
double delayInSeconds = 2.0;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
if (self.activityViewController) {
[self showProgressHUDWithMessage:nil];
}
});
// double delayInSeconds = 2.0;
// dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
// dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
// if (self.activityViewController) {
// [self showProgressHUDWithMessage:nil];
// }
// });
// Show
typeof(self) __weak weakSelf = self;
@@ -1593,6 +1594,10 @@
self.navigationController.navigationBar.userInteractionEnabled = YES;
}
-(void)didSavePhoto
{
[self savePhoto];
}
#pragma mark - Actions
- (void)savePhoto {
@@ -1611,7 +1616,7 @@
}
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {
[self showProgressHUDCompleteMessage: error ? NSLocalizedString(@"Failed", @"Informing the user a process has failed") : NSLocalizedString(@"Saved", @"Informing the user an item has been saved")];
[self showProgressHUDCompleteMessage: error ? NSLocalizedString(@"SaveFailed", @"Informing the user a process has failed") : NSLocalizedString(@"Saved", @"Informing the user an item has been saved")];
[self hideControlsAfterDelay]; // Continue as normal...
}
@@ -23,5 +23,6 @@
- (void)imageView:(UIImageView *)imageView singleTapDetected:(UITouch *)touch;
- (void)imageView:(UIImageView *)imageView doubleTapDetected:(UITouch *)touch;
- (void)imageView:(UIImageView *)imageView tripleTapDetected:(UITouch *)touch;
- (void)imageView:(UIImageView *)imageView longTapDetected:(UIGestureRecognizer *)gestureRecognizer;
@end
@@ -12,6 +12,10 @@
- (id)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame])) {
UILongPressGestureRecognizer *longpress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(onlongtabed:)];
longpress.minimumPressDuration = 1.0;///至少按1秒
longpress.numberOfTouchesRequired = 1;//只有一个触点
[self addGestureRecognizer:longpress];
self.userInteractionEnabled = YES;
}
return self;
@@ -19,6 +23,10 @@
- (id)initWithImage:(UIImage *)image {
if ((self = [super initWithImage:image])) {
UILongPressGestureRecognizer *longpress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(onlongtabed:)];
longpress.minimumPressDuration = 1.0;///至少按1秒
longpress.numberOfTouchesRequired = 1;//只有一个触点
[self addGestureRecognizer:longpress];
self.userInteractionEnabled = YES;
}
return self;
@@ -26,11 +34,23 @@
- (id)initWithImage:(UIImage *)image highlightedImage:(UIImage *)highlightedImage {
if ((self = [super initWithImage:image highlightedImage:highlightedImage])) {
UILongPressGestureRecognizer *longpress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(onlongtabed:)];
longpress.minimumPressDuration = 1.0;///至少按1秒
longpress.numberOfTouchesRequired = 1;//只有一个触点
[self addGestureRecognizer:longpress];
self.userInteractionEnabled = YES;
}
return self;
}
-(void)onlongtabed:(UIGestureRecognizer*)gestureRecognizer
{
if(gestureRecognizer.state == UIGestureRecognizerStateBegan){
[self handleLongTap:gestureRecognizer];
}
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
NSUInteger tapCount = touch.tapCount;
@@ -64,5 +84,8 @@
if ([_tapDelegate respondsToSelector:@selector(imageView:tripleTapDetected:)])
[_tapDelegate imageView:self tripleTapDetected:touch];
}
-(void)handleLongTap:(UIGestureRecognizer*)gestureRecognizer{
if ([_tapDelegate respondsToSelector:@selector(imageView:longTapDetected:)])
[_tapDelegate imageView:self longTapDetected:gestureRecognizer];
}
@end
@@ -14,7 +14,7 @@
#import "MWPhotoBrowserPrivate.h"
// Private methods and properties
@interface MWZoomingScrollView () {
@interface MWZoomingScrollView ()<UIActionSheetDelegate> {
MWPhotoBrowser __weak *_photoBrowser;
MWTapDetectingView *_tapView; // for background taps
@@ -157,7 +157,9 @@
// Image failed so just show black!
- (void)displayImageFailure {
[self hideLoadingIndicator];
_photoImageView.image = nil;
_photoImageView.image = [UIImage imageNamed:@"MWPhotoBrowser.bundle/images/ImageError.png"];
_photoImageView.hidden = NO;
return;
if (!_loadingError) {
_loadingError = [UIImageView new];
_loadingError.image = [UIImage imageNamed:@"MWPhotoBrowser.bundle/images/ImageError.png"];
@@ -349,6 +351,12 @@
#pragma mark - Tap Detection
- (void)handleSingleTap:(CGPoint)touchPoint {
// [UIView animateWithDuration:0.3 animations:^{
// _photoBrowser.navigationController.navigationBarHidden = !_photoBrowser.navigationController.navigationBarHidden;
// }];
[_photoBrowser.navigationController popViewControllerAnimated:YES];
[_photoBrowser performSelector:@selector(toggleControls) withObject:nil afterDelay:0.2];
}
@@ -380,11 +388,27 @@
// Image View
- (void)imageView:(UIImageView *)imageView singleTapDetected:(UITouch *)touch {
[self handleSingleTap:[touch locationInView:imageView]];
// [self handleSingleTap:[touch locationInView:imageView]];
[_photoBrowser.navigationController popViewControllerAnimated:YES];
}
- (void)imageView:(UIImageView *)imageView doubleTapDetected:(UITouch *)touch {
[self handleDoubleTap:[touch locationInView:imageView]];
}
-(void)imageView:(UIImageView *)imageView longTapDetected:(UIGestureRecognizer *)gestureRecognizer
{
UIActionSheet* actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"保存图片", nil];
actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[actionSheet showInView:self];
}
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 0) {
[_photoBrowser didSavePhoto];
}
}
// Background View
- (void)view:(UIView *)view singleTapDetected:(UITouch *)touch {
@@ -22,10 +22,10 @@
self.tableView.delegate = self;
self.tableView.dataSource = self;
[self.tableView addLegendHeaderWithRefreshingTarget:self refreshingAction:@selector(headerRereshing)];
[self.tableView addLegendFooterWithRefreshingTarget:self refreshingAction:@selector(footerRereshing)];
// [self.tableView addLegendFooterWithRefreshingTarget:self refreshingAction:@selector(footerRereshing)];
[self customViewDidLoad];
[self.tableView.footer setTitle:@"" forState:MJRefreshFooterStateNoMoreData];
self.tableView.separatorColor = [UIColor clearColor];
// self.tableView.separatorColor = [UIColor clearColor];
}
#pragma mark MJRefreshDelegate
@@ -7,7 +7,13 @@
//
#import <UIKit/UIKit.h>
@interface NoteCommentViewController : UIViewController
#import "BaseRefreshViewController.h"
@class Text_Image;
@interface NoteCommentViewController : BaseRefreshViewController
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (weak, nonatomic) IBOutlet UIView *lineView;
- (IBAction)commentBtnClick:(id)sender;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lineHeight;
@property (weak, nonatomic) IBOutlet UIButton *commentBtn;
@property (strong, nonatomic)Text_Image* text_image;
@end
@@ -7,9 +7,21 @@
//
#import "NoteCommentViewController.h"
@interface NoteCommentViewController ()
#import "NoteTableViewCell.h"
#import "NoteViewModel.h"
#import "CommentTextView.h"
#import "CommentGoodListCellTableViewCell.h"
#import "UserViewModel.h"
#import "CommentViewModel.h"
#import "CommentTableViewCell.h"
@interface NoteCommentViewController ()<UITableViewDelegate,UITableViewDataSource>
{
NoteTableViewCell* _headView;
CommentTextView* _commentTextView;
CommentGoodListCellTableViewCell* _commentGoodListCellTableViewCell;
NSInteger _page;
NSMutableArray* _commentInfoArr;
}
@end
@implementation NoteCommentViewController
@@ -17,8 +29,166 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
_page = 1;
_commentInfoArr = [[NSMutableArray alloc] init];
[self customViewDidLoad];
self.navigationItem.title = @"评论";
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
_headView = [Ash_UIUtil instanceXibView:@"NoteTableViewCell"];
[_headView setText_Image:_text_image];
CGFloat height = [NoteTableViewCell heightWith:_text_image];
_headView.frame = CGRectMake(0, 0, kScreenWidth, height);
_headView.isComment = YES;
UIView* tableHeadView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, height+80)];
[tableHeadView addSubview:_headView];
_commentGoodListCellTableViewCell = [Ash_UIUtil instanceXibView:@"CommentGoodListCellTableViewCell"];
_commentGoodListCellTableViewCell.frame = CGRectMake(0, height, kScreenWidth, 80);
[tableHeadView addSubview:_commentGoodListCellTableViewCell];
self.tableView.tableHeaderView = tableHeadView;
_lineView.backgroundColor = [UIColor lineColor];
_lineHeight.constant = 0.5;
CGFloat top = 0; // 顶端盖高度
CGFloat bottom = 0 ; // 底端盖高度
CGFloat left = 50; // 左端盖宽度
CGFloat right = 30; // 右端盖宽度
UIEdgeInsets insets = UIEdgeInsetsMake(top, left, bottom, right);
UIImage *img=[UIImage imageNamed:@"toolbar_light_comment.png"];
img=[img resizableImageWithCapInsets:insets resizingMode:UIImageResizingModeStretch];
[_commentBtn setBackgroundImage:img forState:UIControlStateNormal];
_commentTextView = [Ash_UIUtil instanceXibView:@"CommentTextView"];
_commentTextView.frame = self.view.frame;
[self.view addSubview:_commentTextView];
_commentTextView.recordId = _text_image.messageId;
[_commentTextView setHidden:YES];
[self loadData];
[self requirePraiseUser];
CGPoint point = self.tableView.contentOffset;
point.y = height;
[self.tableView setContentOffset:point];
}
-(void)requirePraiseUser
{
PropertyEntity* pro = [UserViewModel requireLoadPraiseUserWithRecordId:_text_image.messageId withPage:1 withPage_size:10];
[RequireEngine requireWithProperty:pro completionBlock:^(id viewModel) {
if ([viewModel success]) {
[_commentGoodListCellTableViewCell setUserInfoArr:[(UserViewModel*)viewModel userInfoArr]];
}
} failedBlock:^(NSError *error) {
}];
}
#pragma mark MJRefreshDelegate
-(void)headerRereshing
{
_page=1;
[self requirePraiseUser];
[self loadData];
}
-(void)footerRereshing
{
[self loadData];
}
-(void)loadData
{
[MobClick event:kUmen_note];
PropertyEntity* pro = [CommentViewModel requireLoadCommentWithRecordId:_text_image.messageId withPage:_page withPage_size:DefaultPageSize];
[RequireEngine requireWithProperty:pro completionBlock:^(id viewModel) {
if ([viewModel success]) {
CommentViewModel* commentViewModel = (CommentViewModel*)viewModel;
if (_page <= 1) {
[_commentInfoArr removeAllObjects];
}
if (commentViewModel.commentInfoArr) {
[_commentInfoArr addObjectsFromArray:commentViewModel.commentInfoArr];
}
[self footerEndRefreshing];
[self headerEndRefreshing];
if (commentViewModel.commentInfoArr.count<DefaultPageSize) {
[self.tableView removeFooter];
}else{
[self.tableView addGifFooterWithRefreshingTarget:self refreshingAction:@selector(footerRereshing)];
}
_page++;
}else
{
[MBProgressHUD errorHudWithView:self.view label:[viewModel errMessage] hidesAfter:1.0];
}
[self.tableView reloadData];
} failedBlock:^(NSError *error) {
[MBProgressHUD errorHudWithView:self.view label:kNetworkErrorTips hidesAfter:1.0];
[self footerEndRefreshing];
[self headerEndRefreshing];
}];
}
#pragma mark UITableViewDelegate
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return _commentInfoArr.count;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
CommentInfoViewModel* commentInfoViewModel = [_commentInfoArr objectAtIndex:indexPath.row];
return [CommentTableViewCell getHeightWithCommentInfoViewModel:commentInfoViewModel];
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 5.0;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return 0.01;
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString* cellIdentifier = [NSString stringWithFormat:@"cellIdentifier%ld",indexPath.section];
CommentTableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (!cell) {
UINib* nib = nil;
nib = [UINib nibWithNibName:@"CommentTableViewCell" bundle:nil];
[tableView registerNib:nib forCellReuseIdentifier:cellIdentifier];
cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
}
CommentInfoViewModel* commentInfoViewModel = [_commentInfoArr objectAtIndex:indexPath.row];
[cell setCommentInfoViewModel:commentInfoViewModel];
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
@@ -34,4 +204,8 @@
}
*/
- (IBAction)commentBtnClick:(id)sender {
[_commentTextView show];
}
@end
@@ -1,19 +1,77 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="NoteCommentViewController">
<connections>
<outlet property="commentBtn" destination="LoG-6c-iVd" id="Hxw-c9-1Go"/>
<outlet property="lineHeight" destination="kBP-dx-v3s" id="2n7-4O-MgN"/>
<outlet property="lineView" destination="Q7M-ao-nkc" id="OHX-CJ-zTh"/>
<outlet property="tableView" destination="eGy-0s-zXs" id="3eO-bG-Tth"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="eGy-0s-zXs">
<rect key="frame" x="0.0" y="0.0" width="320" height="524"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="r5a-d5-WZQ">
<rect key="frame" x="0.0" y="524" width="320" height="44"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Q7M-ao-nkc">
<rect key="frame" x="0.0" y="0.0" width="320" height="1"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="kBP-dx-v3s"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LoG-6c-iVd">
<rect key="frame" x="8" y="9" width="304" height="30"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<rect key="contentStretch" x="0.5" y="0.5" width="0.5" height="0.5"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<inset key="contentEdgeInsets" minX="40" minY="0.0" maxX="0.0" maxY="0.0"/>
<state key="normal" title="写评论">
<color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="commentBtnClick:" destination="-1" eventType="touchUpInside" id="StF-cu-W2q"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="Q7M-ao-nkc" firstAttribute="top" secondItem="r5a-d5-WZQ" secondAttribute="top" id="5kU-D4-zdd"/>
<constraint firstAttribute="trailing" secondItem="Q7M-ao-nkc" secondAttribute="trailing" id="QUG-jm-dXb"/>
<constraint firstAttribute="height" constant="44" id="XhR-hh-n0j"/>
<constraint firstItem="LoG-6c-iVd" firstAttribute="leading" secondItem="r5a-d5-WZQ" secondAttribute="leading" constant="8" id="m2l-n5-FSN"/>
<constraint firstItem="Q7M-ao-nkc" firstAttribute="leading" secondItem="r5a-d5-WZQ" secondAttribute="leading" id="n0H-cg-00e"/>
<constraint firstItem="LoG-6c-iVd" firstAttribute="top" secondItem="Q7M-ao-nkc" secondAttribute="bottom" constant="8" id="vpe-yl-926"/>
<constraint firstAttribute="bottom" secondItem="LoG-6c-iVd" secondAttribute="bottom" constant="5" id="ztc-Jx-KGW"/>
<constraint firstAttribute="trailing" secondItem="LoG-6c-iVd" secondAttribute="trailing" constant="8" id="zuv-Pq-lj8"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="eGy-0s-zXs" secondAttribute="trailing" id="6Ug-QV-WBv"/>
<constraint firstItem="r5a-d5-WZQ" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="Cn8-HW-N8x"/>
<constraint firstItem="eGy-0s-zXs" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="T0N-Jq-82f"/>
<constraint firstAttribute="bottom" secondItem="r5a-d5-WZQ" secondAttribute="bottom" id="gEs-fr-rLR"/>
<constraint firstAttribute="trailing" secondItem="r5a-d5-WZQ" secondAttribute="trailing" id="hJs-qe-YeS"/>
<constraint firstAttribute="bottom" secondItem="eGy-0s-zXs" secondAttribute="bottom" constant="44" id="x21-nP-6Rf"/>
<constraint firstItem="eGy-0s-zXs" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="x8V-Gh-ebM"/>
</constraints>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
</view>
</objects>
</document>
@@ -0,0 +1,26 @@
//
// CommentViewModel.h
// Ash_AWord
//
// Created by xmfish on 15/6/5.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import "BaseViewModel.h"
@interface CommentInfoViewModel : BaseViewModel
@property (nonatomic, strong) NSString *commentId;
@property (nonatomic, strong) NSString *ownerId;
@property (nonatomic, strong) NSString *ownerFigureurl;
@property (nonatomic, strong) NSString *ownerName;
@property (nonatomic, strong) NSString *content;
@property (nonatomic, strong) NSString *createTime;
@end
@interface CommentViewModel : BaseViewModel
@property (nonatomic, strong)NSArray* commentInfoArr;
+(PropertyEntity*)requireAddCommentWithReconrdId:(NSInteger)recordId withContent:(NSString*)content;
+(PropertyEntity*)requireLoadCommentWithRecordId:(NSInteger)recordId withPage:(NSInteger)page withPage_size:(NSInteger)page_size;
@end
@@ -0,0 +1,65 @@
//
// CommentViewModel.m
// Ash_AWord
//
// Created by xmfish on 15/6/5.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import "CommentViewModel.h"
@implementation CommentInfoViewModel
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"content": @"content",
@"createTime": @"createTime",
@"commentId": @"id",
@"ownerId" : @"ownerId",
@"ownerFigureurl" : @"ownerFigureurl",
@"ownerName" : @"ownerName",
};
}
@end
@implementation CommentViewModel
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
NSMutableDictionary* dic = [NSMutableDictionary dictionaryWithDictionary:[super JSONKeyPathsByPropertyKey]];
[dic setObject:@"comments" forKey:@"commentInfoArr"];
return dic;
}
- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error {
self = [super initWithDictionary:dictionaryValue error:error];
if (self == nil) return nil;
return self;
}
+ (NSValueTransformer *)commentInfoArrJSONTransformer{
return [NSValueTransformer mtl_JSONArrayTransformerWithModelClass:CommentInfoViewModel.class];
}
+(PropertyEntity*)requireAddCommentWithReconrdId:(NSInteger)recordId withContent:(NSString *)content
{
PropertyEntity *pro = [[PropertyEntity alloc] init];
pro.requireType = HTTPRequestTypeWithPOST;
pro.reqURL = @"rs/text_image/add_comment";
pro.responesOBJ = self.class;
pro.pro = @{
@"record_id": [NSString stringWithFormat:@"%ld",recordId],
@"content": content,
};
return pro;
}
+(PropertyEntity*)requireLoadCommentWithRecordId:(NSInteger)recordId withPage:(NSInteger)page withPage_size:(NSInteger)page_size
{
PropertyEntity *pro = [[PropertyEntity alloc] init];
pro.requireType = HTTPRequestTypeWithGET;
pro.reqURL = @"rs/text_image/load_comment";
pro.responesOBJ = self.class;
pro.pro = @{@"record_id": [NSString stringWithFormat:@"%ld",recordId],
@"page": [NSString stringWithFormat:@"%ld",page],
@"page_size": [NSString stringWithFormat:@"%ld",page_size],
};
return pro;
}
@end
@@ -0,0 +1,25 @@
//
// UserInfoViewModel.h
// Ash_AWord
//
// Created by xmfish on 15/6/4.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import "BaseViewModel.h"
@interface UserInfoViewModel : BaseViewModel
@property (nonatomic, strong) NSString *uid;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *gender;
@property (nonatomic, strong) NSString *figureurl;
@end
@interface UserViewModel : BaseViewModel
@property (nonatomic, strong) NSArray *userInfoArr;;
+(PropertyEntity*)requireLoadPraiseUserWithRecordId:(NSInteger)recordId withPage:(NSInteger)page withPage_size:(NSInteger)page_size;
@end
@@ -0,0 +1,47 @@
//
// UserInfoViewModel.m
// Ash_AWord
//
// Created by xmfish on 15/6/4.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import "UserViewModel.h"
@implementation UserInfoViewModel
@end
@implementation UserViewModel
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
NSMutableDictionary* dic = [NSMutableDictionary dictionaryWithDictionary:[super JSONKeyPathsByPropertyKey]];
[dic setObject:@"users" forKey:@"userInfoArr"];
return dic;
}
- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error {
self = [super initWithDictionary:dictionaryValue error:error];
if (self == nil) return nil;
return self;
}
+ (NSValueTransformer *)userInfoArrJSONTransformer{
return [NSValueTransformer mtl_JSONArrayTransformerWithModelClass:UserInfoViewModel.class];
}
+(PropertyEntity*)requireLoadPraiseUserWithRecordId:(NSInteger)recordId withPage:(NSInteger)page withPage_size:(NSInteger)page_size
{
PropertyEntity *pro = [[PropertyEntity alloc] init];
pro.requireType = HTTPRequestTypeWithGET;
pro.reqURL = @"rs/text_image/load_praise_user";
pro.responesOBJ = self.class;
pro.pro = @{@"record_id": [NSString stringWithFormat:@"%ld",recordId],
@"page": [NSString stringWithFormat:@"%ld",(long)page],
@"page_size": [NSString stringWithFormat:@"%ld",(long)page_size],
};
return pro;
}
@end
@@ -0,0 +1,26 @@
//
// NoteCommentViewModel.h
// Ash_AWord
//
// Created by xmfish on 15/6/2.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import "BaseViewModel.h"
@interface NoteCommentInfoViewModel : BaseViewModel
@property (nonatomic, strong)NSString* commentId;
@property (nonatomic, strong)NSString* ownerId;
@property (nonatomic, strong) NSURL *ownerFigureUrl;
@property (nonatomic, strong) NSString *ownerName;
@property (nonatomic, strong) NSString *content;
@property (nonatomic, strong) NSString *createTime;
@end
@interface NoteCommentViewModel : BaseViewModel
@property (nonatomic, strong)NSArray* commentArr;
+(PropertyEntity*)requireLoadWithPage:(NSInteger)page withPage_size:(NSInteger)page_size withRecordId:(NSString*)recordId;
+(PropertyEntity*)requireAddwithRecordId:(NSString*)recordId withContent:(NSString*)content;
@end
@@ -0,0 +1,78 @@
//
// NoteCommentViewModel.m
// Ash_AWord
//
// Created by xmfish on 15/6/2.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import "NoteCommentViewModel.h"
@implementation NoteCommentInfoViewModel
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"content": @"content",
@"createTime": @"createTime",
@"commentId": @"id",
@"ownerId" : @"ownerId",
@"ownerFigureurl" : @"ownerFigureurl",
@"ownerName" : @"ownerName",
};
}
+ (NSValueTransformer *)ownerFigureurlJSONTransformer {
return [NSValueTransformer valueTransformerForName:MTLURLValueTransformerName];
}
- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error {
self = [super initWithDictionary:dictionaryValue error:error];
if (self == nil) return nil;
// self.content = [self.content stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
// Store a value that needs to be determined locally upon initialization.
return self;
}
@end
@implementation NoteCommentViewModel
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
NSMutableDictionary* dic = [NSMutableDictionary dictionaryWithDictionary:[super JSONKeyPathsByPropertyKey]];
[dic setObject:@"comments" forKey:@"commentArr"];
return dic;
}
- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error {
self = [super initWithDictionary:dictionaryValue error:error];
if (self == nil) return nil;
return self;
}
+ (NSValueTransformer *)commentArrJSONTransformer{
return [NSValueTransformer mtl_JSONArrayTransformerWithModelClass:NoteCommentInfoViewModel.class];
}
+(PropertyEntity*)requireLoadWithPage:(NSInteger)page withPage_size:(NSInteger)page_size withRecordId:(NSString *)recordId
{
PropertyEntity *pro = [[PropertyEntity alloc] init];
pro.requireType = HTTPRequestTypeWithGET;
pro.reqURL = @"rs/text_image/load_comment";
pro.responesOBJ = self.class;
pro.pro = @{@"record_id": recordId,
@"page": [NSString stringWithFormat:@"%ld",(long)page],
@"page_size": [NSString stringWithFormat:@"%ld",(long)page_size],
};
return pro;
}
+(PropertyEntity*)requireAddwithRecordId:(NSString *)recordId withContent:(NSString *)content
{
PropertyEntity *pro = [[PropertyEntity alloc] init];
pro.requireType = HTTPRequestTypeWithGET;
pro.reqURL = @"rs/text_image/add_comment";
pro.responesOBJ = self.class;
pro.pro = @{@"record_id": recordId,
@"content": content,
};
return pro;
}
@end
@@ -41,4 +41,7 @@ typedef enum {
+(PropertyEntity*)requireDelWithRecordId:(NSInteger)recordId;
@end
+4 -2
View File
@@ -65,8 +65,8 @@
pro.reqURL = @"rs/text_image/load_public";
pro.responesOBJ = self.class;
pro.pro = @{@"order_by": [NSString stringWithFormat:@"%u",order_by],
@"page": [NSString stringWithFormat:@"%ld",page],
@"page_size": [NSString stringWithFormat:@"%ld",page_size],
@"page": [NSString stringWithFormat:@"%ld",(long)page],
@"page_size": [NSString stringWithFormat:@"%ld",(long)page_size],
};
return pro;
@@ -138,4 +138,6 @@
return pro;
}
@end
@@ -11,4 +11,7 @@
@interface CommentGoodListCellTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *barBtImageView;
- (IBAction)showMoreBtnClick:(id)sender;
@property (weak, nonatomic) IBOutlet UIButton *showMoreBtn;
-(void)setUserInfoArr:(NSArray*)userInfoArr;
@end
@@ -7,11 +7,13 @@
//
#import "CommentGoodListCellTableViewCell.h"
#import "UserViewModel.h"
@implementation CommentGoodListCellTableViewCell
- (void)awakeFromNib {
// Initialization code
[self setUserInfoArr:nil];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
@@ -20,4 +22,39 @@
// Configure the view for the selected state
}
- (IBAction)showMoreBtnClick:(id)sender {
}
-(void)setUserInfoArr:(NSArray *)userInfoArr
{
for (UIView* view in [_barBtImageView subviews]) {
if (view.tag != 100) {
[view removeFromSuperview];
}
}
for (int i=0; i<userInfoArr.count; i++) {
if (i*50+10 > kScreenWidth-40) {
break;
}
UserInfoViewModel* userInfoViewModel = [userInfoArr objectAtIndex:i];
UIImageView* imageView = [[UIImageView alloc] initWithFrame:CGRectMake(i*48+10, 18, 36, 36)];
imageView.backgroundColor = [UIColor lightGrayColor];
imageView.layer.cornerRadius = imageView.frame.size.width/2;
imageView.layer.masksToBounds = YES;
[imageView sd_setImageWithURL:[NSURL URLWithString:userInfoViewModel.figureurl] placeholderImage:DefaultUserIcon];
[_barBtImageView addSubview:imageView];
}
if (userInfoArr.count == 0) {
UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(10, 18, 300, 36)];
label.text = @"还没有人点赞呢~";
label.textColor = [UIColor lightGrayColor];
[_barBtImageView addSubview:label];
[_showMoreBtn setEnabled:NO];
}else
{
[_showMoreBtn setEnabled:YES];
}
}
@end
@@ -16,31 +16,56 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="praise-wall-white.png" translatesAutoresizingMaskIntoConstraints="NO" id="W4b-n6-a3b">
<rect key="frame" x="8" y="11" width="304" height="60"/>
<rect key="frame" x="0.0" y="11" width="320" height="60"/>
<rect key="contentStretch" x="0.5" y="0.5" width="0.5" height="0.5"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="Jo1-RX-wkX"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="accessory.png" translatesAutoresizingMaskIntoConstraints="NO" id="1oY-th-INl">
<rect key="frame" x="294" y="40" width="11" height="15"/>
<imageView userInteractionEnabled="NO" tag="100" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="accessory.png" translatesAutoresizingMaskIntoConstraints="NO" id="1oY-th-INl">
<rect key="frame" x="302" y="40" width="11" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="pG0-WF-Ko7"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8hA-jI-rjQ">
<rect key="frame" x="0.0" y="11" width="320" height="60"/>
<state key="normal">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showMoreBtnClick:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="kNO-tE-N4p"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="W4b-n6-a3b" firstAttribute="width" secondItem="8hA-jI-rjQ" secondAttribute="width" id="98z-PA-MYj"/>
<constraint firstItem="W4b-n6-a3b" firstAttribute="centerX" secondItem="8hA-jI-rjQ" secondAttribute="centerX" id="DlB-hu-56Z"/>
<constraint firstAttribute="trailing" secondItem="1oY-th-INl" secondAttribute="trailing" constant="7" id="O24-QI-AfM"/>
<constraint firstItem="1oY-th-INl" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="32" id="PDz-5x-UtU"/>
<constraint firstAttribute="trailingMargin" secondItem="1oY-th-INl" secondAttribute="trailing" constant="7" id="TPf-qr-G9S"/>
<constraint firstAttribute="bottomMargin" secondItem="W4b-n6-a3b" secondAttribute="bottom" id="VJW-mr-NKP"/>
<constraint firstAttribute="trailingMargin" secondItem="W4b-n6-a3b" secondAttribute="trailing" id="YYn-wN-cho"/>
<constraint firstItem="W4b-n6-a3b" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" id="l9L-v6-QGN"/>
<constraint firstAttribute="trailingMargin" secondItem="W4b-n6-a3b" secondAttribute="trailing" constant="-8" id="YYn-wN-cho"/>
<constraint firstItem="W4b-n6-a3b" firstAttribute="centerY" secondItem="8hA-jI-rjQ" secondAttribute="centerY" id="jXv-2f-SbB"/>
<constraint firstItem="W4b-n6-a3b" firstAttribute="height" secondItem="8hA-jI-rjQ" secondAttribute="height" id="kml-e1-AgE"/>
<constraint firstItem="W4b-n6-a3b" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="-8" id="l9L-v6-QGN"/>
<constraint firstAttribute="bottomMargin" secondItem="1oY-th-INl" secondAttribute="bottom" constant="16" id="pyg-K1-vVE"/>
<constraint firstItem="W4b-n6-a3b" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="qhY-GG-1W0"/>
<constraint firstAttribute="trailing" secondItem="W4b-n6-a3b" secondAttribute="trailing" id="vSN-xo-hZd"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="YYn-wN-cho"/>
<exclude reference="l9L-v6-QGN"/>
<exclude reference="TPf-qr-G9S"/>
<exclude reference="pyg-K1-vVE"/>
</mask>
</variation>
</tableViewCellContentView>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.93725490199999995" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<connections>
<outlet property="barBtImageView" destination="W4b-n6-a3b" id="z9a-Am-LNG"/>
<outlet property="showMoreBtn" destination="8hA-jI-rjQ" id="Kbd-B0-9w3"/>
</connections>
<point key="canvasLocation" x="208" y="233"/>
</tableViewCell>
@@ -0,0 +1,20 @@
//
// CommentTableViewCell.h
// Ash_AWord
//
// Created by xmfish on 15/6/2.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import <UIKit/UIKit.h>
@class CommentInfoViewModel;
@interface CommentTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *avatarImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UITextView *contentTextView;
-(void)setCommentInfoViewModel:(CommentInfoViewModel*)commentInfoViewModel;
+(CGFloat)getHeightWithCommentInfoViewModel:(CommentInfoViewModel*)commentInfoViewModel;
@end
@@ -0,0 +1,44 @@
//
// CommentTableViewCell.m
// Ash_AWord
//
// Created by xmfish on 15/6/2.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import "CommentTableViewCell.h"
#import "CommentViewModel.h"
@implementation CommentTableViewCell
{
CommentInfoViewModel* _commentInfoViewModel;
}
- (void)awakeFromNib {
// Initialization code
_avatarImageView.layer.masksToBounds = YES;
_avatarImageView.layer.cornerRadius = 18.0;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
-(void)setCommentInfoViewModel:(CommentInfoViewModel *)commentInfoViewModel
{
[_avatarImageView sd_setImageWithURL:[NSURL URLWithString:commentInfoViewModel.ownerFigureurl] placeholderImage:DefaultUserIcon];
_nameLabel.text = commentInfoViewModel.ownerName;
_contentTextView.text = commentInfoViewModel.content;
_timeLabel.text = [CommonUtil timeFromtimeSp:commentInfoViewModel.createTime];
}
+(CGFloat)getHeightWithCommentInfoViewModel:(CommentInfoViewModel *)commentInfoViewModel
{
UIFont *font = [UIFont appFontOfSize:13.0];
CGSize size = CGSizeMake(kScreenWidth - 50,MAXFLOAT);
CGRect labelRect = [commentInfoViewModel.content boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:font} context:nil];
return labelRect.size.height+60;
}
@end
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="146" id="KGk-i7-Jjw" customClass="CommentTableViewCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="146"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="defaultUserIcon.png" translatesAutoresizingMaskIntoConstraints="NO" id="qab-Nl-rao">
<rect key="frame" x="8" y="8" width="36" height="36"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="GCK-JB-IIB"/>
<constraint firstAttribute="width" constant="36" id="Hh2-wZ-wBY"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="游客" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HNF-FY-BJ4">
<rect key="frame" x="52" y="8" width="238" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aio-xk-LSD">
<rect key="frame" x="52" y="25" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GI8-56-N0b">
<rect key="frame" x="46" y="27" width="264" height="108"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="GI8-56-N0b" secondAttribute="trailing" constant="10" id="BL7-jI-GY8"/>
<constraint firstAttribute="trailing" secondItem="GI8-56-N0b" secondAttribute="trailing" constant="10" id="BsC-Ck-gzg"/>
<constraint firstItem="GI8-56-N0b" firstAttribute="leading" secondItem="qab-Nl-rao" secondAttribute="trailing" constant="2" id="QWt-hz-dwp"/>
<constraint firstItem="GI8-56-N0b" firstAttribute="bottom" secondItem="H2p-sc-9uM" secondAttribute="bottomMargin" id="Ug2-cK-68b"/>
<constraint firstItem="HNF-FY-BJ4" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" id="Vtb-ph-9tQ"/>
<constraint firstItem="GI8-56-N0b" firstAttribute="top" secondItem="aio-xk-LSD" secondAttribute="bottom" constant="2" id="XU6-kE-kV9"/>
<constraint firstItem="qab-Nl-rao" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" id="Xim-WS-hus"/>
<constraint firstAttribute="bottomMargin" secondItem="GI8-56-N0b" secondAttribute="bottom" constant="10" id="ZZh-WV-fAM"/>
<constraint firstAttribute="trailingMargin" secondItem="HNF-FY-BJ4" secondAttribute="trailing" constant="22" id="ZkL-SX-vgZ"/>
<constraint firstItem="GI8-56-N0b" firstAttribute="top" secondItem="HNF-FY-BJ4" secondAttribute="bottom" constant="15" id="fiw-HX-QRQ"/>
<constraint firstItem="aio-xk-LSD" firstAttribute="top" secondItem="HNF-FY-BJ4" secondAttribute="bottom" constant="1" id="gYF-ag-8gr"/>
<constraint firstAttribute="bottom" secondItem="GI8-56-N0b" secondAttribute="bottom" constant="10" id="gmi-Ab-HgI"/>
<constraint firstAttribute="trailingMargin" secondItem="GI8-56-N0b" secondAttribute="trailing" constant="-8" id="kmA-9A-Nts"/>
<constraint firstItem="aio-xk-LSD" firstAttribute="leading" secondItem="qab-Nl-rao" secondAttribute="trailing" constant="8" id="oIw-sV-8qp"/>
<constraint firstItem="HNF-FY-BJ4" firstAttribute="leading" secondItem="qab-Nl-rao" secondAttribute="trailing" constant="8" id="vHk-Qa-UVw"/>
<constraint firstItem="qab-Nl-rao" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" id="vo4-6n-JGW"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="BL7-jI-GY8"/>
<exclude reference="Ug2-cK-68b"/>
<exclude reference="ZZh-WV-fAM"/>
<exclude reference="fiw-HX-QRQ"/>
<exclude reference="kmA-9A-Nts"/>
</mask>
</variation>
</tableViewCellContentView>
<connections>
<outlet property="avatarImageView" destination="qab-Nl-rao" id="wUN-5h-CDf"/>
<outlet property="contentTextView" destination="GI8-56-N0b" id="gTA-ST-k0w"/>
<outlet property="nameLabel" destination="HNF-FY-BJ4" id="gqu-ya-Fzi"/>
<outlet property="timeLabel" destination="aio-xk-LSD" id="t5S-sR-9vq"/>
</connections>
<point key="canvasLocation" x="208" y="247"/>
</tableViewCell>
</objects>
<resources>
<image name="defaultUserIcon.png" width="50" height="50"/>
</resources>
</document>
+25
View File
@@ -0,0 +1,25 @@
//
// CommentTextView.h
// Ash_AWord
//
// Created by xmfish on 15/6/4.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface CommentTextView : UIView
@property (nonatomic, assign) NSInteger recordId;
@property (weak, nonatomic) IBOutlet UITextView *contentTextView;
@property (weak, nonatomic) IBOutlet UILabel *tipLabel;
- (IBAction)cancelBtnClick:(id)sender;
- (IBAction)sendBtnClick:(id)sender;
@property (weak, nonatomic) IBOutlet UIView *contentBgView;
- (IBAction)bgBtnClick:(id)sender;
-(void)show;
-(void)hide;
@end
+147
View File
@@ -0,0 +1,147 @@
//
// CommentTextView.m
// Ash_AWord
//
// Created by xmfish on 15/6/4.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import "CommentTextView.h"
#import "CommentViewModel.h"
@interface CommentTextView()<UITextViewDelegate>
@end
@implementation CommentTextView
{
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
- (IBAction)bgBtnClick:(id)sender {
[self hide];
}
-(void)show
{
[_contentTextView becomeFirstResponder];
self.hidden = NO;
self.alpha = 1;
}
-(void)hide
{
[_contentTextView resignFirstResponder];
}
-(void)awakeFromNib
{
_contentTextView.layer.borderWidth = 0.5;
_contentTextView.layer.borderColor = [[UIColor lightGrayColor] CGColor];
_contentTextView.delegate = self;
//使用NSNotificationCenter 鍵盤出現時
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWasShown:)
name:UIKeyboardWillShowNotification object:nil];
//使用NSNotificationCenter 鍵盤隐藏時
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillBeHidden:)
name:UIKeyboardWillHideNotification object:nil];
}
//实现当键盘出现的时候计算键盘的高度大小。用于输入框显示位置
- (void)keyboardWasShown:(NSNotification*)aNotification
{
NSDictionary* info = [aNotification userInfo];
//kbSize即為鍵盤尺寸 (有width, height)
CGSize kbSize = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size;//得到鍵盤的高度
[UIView animateWithDuration:0.3 animations:^{
CGRect frame = _contentBgView.frame;
frame.origin.y = kScreenHeight - kbSize.height - _contentBgView.frame.size.height-64;
_contentBgView.frame = frame;
} completion:^(BOOL finished) {
}];
}
//当键盘隐藏的时候
- (void)keyboardWillBeHidden:(NSNotification*)aNotification
{
[UIView animateWithDuration:0.3 animations:^{
CGRect frame = _contentBgView.frame;
frame.origin.y = kScreenHeight-64;
_contentBgView.frame = frame;
self.alpha = 0;
} completion:^(BOOL finished) {
}];
}
- (IBAction)cancelBtnClick:(id)sender {
[self hide];
}
- (IBAction)sendBtnClick:(id)sender {
if ([_contentTextView.text isEqualToString:@""]) {
_tipLabel.text = @"写点什么吧。。。";
_tipLabel.textColor = [UIColor redColor];
} else if(_contentTextView.text.length > 500)
{
_tipLabel.text = @"评论内容500字内";
_tipLabel.textColor = [UIColor redColor];
}else
{
if (![AWordUser sharedInstance].isLogin)
{
[LoginViewController presentLoginViewControllerInView:nil success:nil];
return;
}
[self comment];
}
}
-(void)comment
{
[MBProgressHUD hudWithView:nil label:@"评论中"];
PropertyEntity* pro = [CommentViewModel requireAddCommentWithReconrdId:_recordId withContent:_contentTextView.text];
[RequireEngine requireWithProperty:pro completionBlock:^(id viewModel) {
[MBProgressHUD hideAllHUDsForView:nil animated:YES];
if ([viewModel success]) {
[MBProgressHUD checkHudWithView:nil label:@"评论成功" hidesAfter:1.0];
_tipLabel.text = @"";
[self hide];
}else{
[MBProgressHUD checkHudWithView:nil label:[viewModel errMessage] hidesAfter:1.0];
}
} failedBlock:^(NSError *error) {
[MBProgressHUD errorHudWithView:nil label:kNetworkErrorTips hidesAfter:2.0];
}];
}
#pragma mark UITextViewDelegate
-(void)textViewDidChange:(UITextView *)textView
{
if (![_contentTextView.text isEqualToString:@""]) {
_tipLabel.text = @"写评论";
_tipLabel.textColor = [UIColor blackColor];
}
}
-(void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
@end
+114
View File
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="CommentTextView">
<rect key="frame" x="0.0" y="-2" width="320" height="262"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xsw-hq-Ttc">
<rect key="frame" x="0.0" y="0.0" width="320" height="103"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<state key="normal">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="bgBtnClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="c1d-5z-Iuj"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kWE-7D-J2E">
<rect key="frame" x="0.0" y="103" width="320" height="159"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xrc-19-5og">
<rect key="frame" x="10" y="51" width="300" height="95"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="95" id="72C-ad-z4J"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jLl-lC-kUN">
<rect key="frame" x="10" y="13" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="4bm-kl-j35"/>
<constraint firstAttribute="height" constant="30" id="u1i-ze-NFl"/>
</constraints>
<state key="normal" image="share_cancel.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted" image="share_cancel_highlighted.png"/>
<connections>
<action selector="cancelBtnClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="mQz-OG-EeS"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="o3I-p5-dj5">
<rect key="frame" x="280" y="13" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="Mos-un-cDW"/>
<constraint firstAttribute="height" constant="30" id="sEa-QL-Myi"/>
</constraints>
<state key="normal" image="share_send.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted" image="share_send_highlighted.png"/>
<connections>
<action selector="sendBtnClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="WzR-jD-d1Y"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="写评论" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qnw-j5-4md">
<rect key="frame" x="135" y="17" width="51" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.93725490199999995" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="jLl-lC-kUN" firstAttribute="top" secondItem="kWE-7D-J2E" secondAttribute="top" constant="13" id="44j-zY-Y1z"/>
<constraint firstAttribute="height" constant="159" id="9J4-Ha-EYY"/>
<constraint firstAttribute="bottom" secondItem="Xrc-19-5og" secondAttribute="bottom" constant="13" id="9o2-uh-RgQ"/>
<constraint firstItem="jLl-lC-kUN" firstAttribute="leading" secondItem="kWE-7D-J2E" secondAttribute="leading" constant="10" id="C4B-qm-NWW"/>
<constraint firstAttribute="centerX" secondItem="Qnw-j5-4md" secondAttribute="centerX" id="G9t-td-MMU"/>
<constraint firstAttribute="trailing" secondItem="o3I-p5-dj5" secondAttribute="trailing" constant="10" id="KtU-x7-1PG"/>
<constraint firstItem="Xrc-19-5og" firstAttribute="leading" secondItem="kWE-7D-J2E" secondAttribute="leading" constant="10" id="LUK-q5-o2i"/>
<constraint firstAttribute="trailing" secondItem="Xrc-19-5og" secondAttribute="trailing" constant="10" id="OSV-gg-1Wn"/>
<constraint firstItem="Qnw-j5-4md" firstAttribute="top" secondItem="kWE-7D-J2E" secondAttribute="top" constant="17" id="eAR-UC-vfc"/>
<constraint firstItem="o3I-p5-dj5" firstAttribute="top" secondItem="kWE-7D-J2E" secondAttribute="top" constant="13" id="oGy-2q-pA7"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.20000000000000001" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="kWE-7D-J2E" secondAttribute="bottom" id="1Iy-oh-epy"/>
<constraint firstItem="kWE-7D-J2E" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="MYR-eo-pyw"/>
<constraint firstItem="kWE-7D-J2E" firstAttribute="top" secondItem="xsw-hq-Ttc" secondAttribute="bottom" id="Mrk-Iw-EzQ"/>
<constraint firstAttribute="trailing" secondItem="kWE-7D-J2E" secondAttribute="trailing" id="PN9-qo-7GF"/>
<constraint firstAttribute="trailing" secondItem="xsw-hq-Ttc" secondAttribute="trailing" id="a1d-KU-uwp"/>
<constraint firstItem="xsw-hq-Ttc" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="abP-Um-WqT"/>
<constraint firstItem="xsw-hq-Ttc" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="ySV-YZ-uJl"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<nil key="simulatedTopBarMetrics"/>
<nil key="simulatedBottomBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="contentBgView" destination="kWE-7D-J2E" id="OPE-49-6rg"/>
<outlet property="contentTextView" destination="Xrc-19-5og" id="oI3-X1-lfh"/>
<outlet property="tipLabel" destination="Qnw-j5-4md" id="96P-f3-T7M"/>
</connections>
<point key="canvasLocation" x="279" y="32"/>
</view>
</objects>
<resources>
<image name="share_cancel.png" width="30" height="30"/>
<image name="share_cancel_highlighted.png" width="30" height="30"/>
<image name="share_send.png" width="30" height="30"/>
<image name="share_send_highlighted.png" width="30" height="30"/>
</resources>
</document>
+3
View File
@@ -7,6 +7,8 @@
//
#import <UIKit/UIKit.h>
#import "UIImageView+Reloading.h"
@protocol NoteTableViewCellDelegate<NSObject>
-(void) reportWithIndex:(NSInteger)index;
@end
@@ -27,6 +29,7 @@
@property (weak, nonatomic) IBOutlet UIButton *shareBtn;
@property (weak, nonatomic) IBOutlet UIButton *closeBtn;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *contentHeight;
@property (nonatomic, assign)BOOL isComment;
- (IBAction)avatarBtnClick:(id)sender;
- (IBAction)imageBtnClick:(id)sender;
+23 -9
View File
@@ -12,6 +12,7 @@
#import "MWPhotoBrowser.h"
#import "SetUpViewController.h"
#import "MyNoteViewController.h"
#import "NoteCommentViewController.h"
@interface NoteTableViewCell()<MWPhotoBrowserDelegate>
@end
@implementation NoteTableViewCell
@@ -20,6 +21,8 @@
}
- (void)awakeFromNib {
// Initialization code
_isComment = NO;
_contentLabel.font = [UIFont appFontOfSize:14.0];
_contentTextView.font = [UIFont appFontOfSize:14.0];
_contentTextView.scrollEnabled = NO;
@@ -61,7 +64,6 @@
return;
}
// _goodBtn.enabled = NO;
if (_goodBtn.selected) {
[_goodBtn setTitle:[NSString stringWithFormat:@"%ld",_text_image.praiseCount-1] forState:UIControlStateNormal];
[_goodBtn setTitle:[NSString stringWithFormat:@"%ld",_text_image.praiseCount-1] forState:UIControlStateSelected];
@@ -107,8 +109,22 @@
_goodBtn.backgroundColor = [UIColor lineColor];
}
}
-(void)setIsComment:(BOOL)isComment
{
if (isComment) {
_badBtn.hidden = YES;
}else
{
_badBtn.hidden = NO;
}
}
//评论
- (IBAction)badBtnClick:(id)sender
{
NoteCommentViewController* noteCommentViewController = [[NoteCommentViewController alloc] init];
noteCommentViewController.hidesBottomBarWhenPushed = YES;
noteCommentViewController.text_image = _text_image;
[[AppDelegate visibleViewController].navigationController pushViewController:noteCommentViewController animated:YES];
}
- (IBAction)shareBtnClick:(id)sender
@@ -126,13 +142,6 @@
-(void)setText_Image:(Text_Image *)text_image
{
_text_image = text_image;
CGSize imageSize = _contentImgView.frame.size;
UIGraphicsBeginImageContextWithOptions(imageSize, 0, [UIScreen mainScreen].scale);
[[UIColor colorWithWhite:0.6 alpha:0.5] set];
UIRectFill(CGRectMake(0, 0, imageSize.width, imageSize.height));
UIImage *pressedColorImg = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
_userName.text = text_image.ownerName;
[_avatar sd_setImageWithURL:text_image.ownerFigureurl placeholderImage:[UIImage imageNamed:@"defaultUserIcon"]];
@@ -145,8 +154,13 @@
CGRect labelRect = [text_image.content boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:font} context:nil];
_contentHeight.constant = labelRect.size.height+25;
_contentTextView.text = text_image.content;
[_contentImgView sd_setImageWithURL:text_image.imageUrl placeholderImage:pressedColorImg];
_contentImgView.imageURL = text_image.imageUrl;
[_contentImgView setOnTouchTapBlock:^(UIImageView *imageView) {
[self imageBtnClick:nil];
}];
[_goodBtn setTitle:[NSString stringWithFormat:@"%ld",(long)text_image.praiseCount] forState:UIControlStateNormal];
[_goodBtn setTitle:[NSString stringWithFormat:@"%ld",(long)text_image.praiseCount] forState:UIControlStateSelected];
[_shareBtn setTitle:[NSString stringWithFormat:@"%ld",(long)text_image.shareCount] forState:UIControlStateNormal];
+14 -11
View File
@@ -39,6 +39,7 @@
<state key="selected" image="btn_bad_clicked.png">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted" image="mainCellCommentClickN.png"/>
<connections>
<action selector="badBtnClick:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="yTA-dX-7dR"/>
</connections>
@@ -62,12 +63,6 @@
<action selector="shareBtnClick:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="nYN-ew-TWw"/>
</connections>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="p9l-PS-2tC">
<rect key="frame" x="8" y="71" width="304" height="139"/>
<constraints>
<constraint firstAttribute="width" constant="304" id="9aR-3O-ifk"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kWq-q0-MPl">
<rect key="frame" x="8" y="71" width="304" height="139"/>
<state key="normal">
@@ -77,6 +72,12 @@
<action selector="imageBtnClick:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="Fbt-xq-94q"/>
</connections>
</button>
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="p9l-PS-2tC">
<rect key="frame" x="8" y="71" width="304" height="139"/>
<constraints>
<constraint firstAttribute="width" constant="304" id="9aR-3O-ifk"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="defaultUserIcon.png" translatesAutoresizingMaskIntoConstraints="NO" id="j8x-8X-1uX">
<rect key="frame" x="8" y="8" width="36" height="36"/>
<constraints>
@@ -118,7 +119,7 @@
</connections>
</button>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" text="内容" translatesAutoresizingMaskIntoConstraints="NO" id="2Rh-LI-LRT">
<rect key="frame" x="3" y="44" width="314" height="27"/>
<rect key="frame" x="3" y="44" width="317" height="27"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="27" id="Uex-tf-US9"/>
@@ -161,7 +162,7 @@
<constraint firstItem="kWq-q0-MPl" firstAttribute="trailing" secondItem="DAR-mT-RbS" secondAttribute="trailing" id="AQQ-Ig-HhY"/>
<constraint firstAttribute="trailingMargin" secondItem="Zq3-YP-dwB" secondAttribute="trailing" constant="-8" id="AWp-lE-bwq"/>
<constraint firstItem="kO5-Uc-AhU" firstAttribute="top" secondItem="Zq3-YP-dwB" secondAttribute="bottom" constant="2" id="Bge-ea-k7W"/>
<constraint firstItem="kWq-q0-MPl" firstAttribute="trailing" secondItem="2Rh-LI-LRT" secondAttribute="trailing" constant="-5" id="BvJ-E9-Lps"/>
<constraint firstItem="kWq-q0-MPl" firstAttribute="trailing" secondItem="2Rh-LI-LRT" secondAttribute="trailing" constant="-8" id="BvJ-E9-Lps"/>
<constraint firstAttribute="bottomMargin" secondItem="xeW-Yw-x4V" secondAttribute="bottom" constant="-3" id="CHt-YD-DRF"/>
<constraint firstItem="kO5-Uc-AhU" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" id="Dxu-6O-Q88"/>
<constraint firstItem="xeW-Yw-x4V" firstAttribute="leading" secondItem="kWq-q0-MPl" secondAttribute="leading" id="GJL-lL-ScI"/>
@@ -202,12 +203,12 @@
<mask key="constraints">
<exclude reference="PiZ-qa-B5O"/>
<exclude reference="Jfg-4S-075"/>
<exclude reference="Dxu-6O-Q88"/>
<exclude reference="fRB-tZ-fsb"/>
<exclude reference="vPz-jB-5bX"/>
<exclude reference="UIC-fn-AiY"/>
<exclude reference="VMh-KQ-qOG"/>
<exclude reference="ble-e8-Va3"/>
<exclude reference="Dxu-6O-Q88"/>
<exclude reference="fRB-tZ-fsb"/>
<exclude reference="vPz-jB-5bX"/>
<exclude reference="9Mq-NC-LT4"/>
<exclude reference="8ZE-ff-hMV"/>
<exclude reference="hsb-xb-XRe"/>
@@ -220,6 +221,7 @@
</mask>
</variation>
</tableViewCellContentView>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<outlet property="avatar" destination="j8x-8X-1uX" id="py5-Xn-OGw"/>
<outlet property="badBtn" destination="A54-Sv-7Vo" id="IBy-Q0-OvN"/>
@@ -242,6 +244,7 @@
<image name="btn_share_clicked.png" width="18" height="18"/>
<image name="closeButtonClick.png" width="21" height="21"/>
<image name="defaultUserIcon.png" width="50" height="50"/>
<image name="mainCellCommentClickN.png" width="23" height="23"/>
<image name="mainCellCommentN.png" width="23" height="23"/>
<image name="mainCellDing.png" width="20" height="20"/>
<image name="mainCellDingClick.png" width="20" height="20"/>
+4
View File
@@ -131,6 +131,10 @@ static const CGFloat kDetailsLabelFontSize = 12.f;
}
+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated {
if (view == nil)
{
view = [UIApplication sharedApplication].delegate.window;
}
NSArray *huds = [MBProgressHUD allHUDsForView:view];
for (MBProgressHUD *hud in huds) {
hud.removeFromSuperViewOnHide = YES;