mirror of
https://github.com/wu736139669/Ash_AWord.git
synced 2026-08-05 05:55:19 +00:00
添加声音的评论
This commit is contained in:
@@ -101,6 +101,8 @@
|
||||
A96F27F51B21C5AC00DA0A66 /* PraiseUserListTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A96F27F31B21C5AC00DA0A66 /* PraiseUserListTableViewCell.xib */; };
|
||||
A96F27F91B21C5C800DA0A66 /* PraiseUserListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A96F27F71B21C5C800DA0A66 /* PraiseUserListViewController.m */; };
|
||||
A96F27FA1B21C5C800DA0A66 /* PraiseUserListViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A96F27F81B21C5C800DA0A66 /* PraiseUserListViewController.xib */; };
|
||||
A9744EDD1B311DBA0082301D /* MessageCommentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9744EDB1B311DBA0082301D /* MessageCommentViewController.m */; };
|
||||
A9744EDE1B311DBA0082301D /* MessageCommentViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9744EDC1B311DBA0082301D /* MessageCommentViewController.xib */; };
|
||||
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 */; };
|
||||
@@ -383,6 +385,9 @@
|
||||
A96F27F61B21C5C800DA0A66 /* PraiseUserListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PraiseUserListViewController.h; sourceTree = "<group>"; };
|
||||
A96F27F71B21C5C800DA0A66 /* PraiseUserListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PraiseUserListViewController.m; sourceTree = "<group>"; };
|
||||
A96F27F81B21C5C800DA0A66 /* PraiseUserListViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PraiseUserListViewController.xib; sourceTree = "<group>"; };
|
||||
A9744EDA1B311DBA0082301D /* MessageCommentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageCommentViewController.h; sourceTree = "<group>"; };
|
||||
A9744EDB1B311DBA0082301D /* MessageCommentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageCommentViewController.m; sourceTree = "<group>"; };
|
||||
A9744EDC1B311DBA0082301D /* MessageCommentViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MessageCommentViewController.xib; 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>"; };
|
||||
@@ -1217,6 +1222,9 @@
|
||||
A90B9FFD1AD6031E00728393 /* MessagePublishViewController.h */,
|
||||
A90B9FFE1AD6031E00728393 /* MessagePublishViewController.m */,
|
||||
A90B9FFF1AD6031E00728393 /* MessagePublishViewController.xib */,
|
||||
A9744EDA1B311DBA0082301D /* MessageCommentViewController.h */,
|
||||
A9744EDB1B311DBA0082301D /* MessageCommentViewController.m */,
|
||||
A9744EDC1B311DBA0082301D /* MessageCommentViewController.xib */,
|
||||
);
|
||||
path = Message;
|
||||
sourceTree = "<group>";
|
||||
@@ -1559,6 +1567,7 @@
|
||||
A90BA01D1AD606A700728393 /* voice-record-bg@2x.png in Resources */,
|
||||
A90BA0231AD619B500728393 /* voice-record-level-bg@2x.png in Resources */,
|
||||
A93441F61ACA918100A6B233 /* tabbarSetup-dark@2x.png in Resources */,
|
||||
A9744EDE1B311DBA0082301D /* MessageCommentViewController.xib in Resources */,
|
||||
A97DBE421ACAE4E300705682 /* first-login-icon.png in Resources */,
|
||||
A97C55051AC933AD0038818A /* UMSLoginViewController.xib in Resources */,
|
||||
A97C55081AC933AD0038818A /* UMSocialSDKResourcesNew.bundle in Resources */,
|
||||
@@ -1623,6 +1632,7 @@
|
||||
A9754A221ADC080E0018BAAD /* LocalFileDataSource.m in Sources */,
|
||||
A97559BF1ACBE6C6004ADA42 /* NotePublishViewModel.m in Sources */,
|
||||
A96862781ACCF13300DDAA6B /* PSTGridLayoutItem.m in Sources */,
|
||||
A9744EDD1B311DBA0082301D /* MessageCommentViewController.m in Sources */,
|
||||
A97938781B20BB0900180C08 /* CommentViewModel.m in Sources */,
|
||||
A97559B21ACBC683004ADA42 /* NotePublishViewController.m in Sources */,
|
||||
A9754A1F1ADC080E0018BAAD /* DataSource.m in Sources */,
|
||||
|
||||
+277
-165
@@ -953,11 +953,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/Message/MessageTableViewCell.m"
|
||||
timestampString = "455713467.245974"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "101"
|
||||
endingLineNumber = "101"
|
||||
startingLineNumber = "114"
|
||||
endingLineNumber = "114"
|
||||
landmarkName = "-tick"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -1033,11 +1033,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/Message/MessageTableViewCell.m"
|
||||
timestampString = "455713467.245974"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "52"
|
||||
endingLineNumber = "52"
|
||||
startingLineNumber = "65"
|
||||
endingLineNumber = "65"
|
||||
landmarkName = "-playBtnClick:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -1049,11 +1049,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/Message/MessageTableViewCell.m"
|
||||
timestampString = "455713467.245974"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "91"
|
||||
endingLineNumber = "91"
|
||||
startingLineNumber = "104"
|
||||
endingLineNumber = "104"
|
||||
landmarkName = "-tick"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -1065,11 +1065,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/Message/MessageTableViewCell.m"
|
||||
timestampString = "455713467.245974"
|
||||
timestampString = "456214264.873794"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "247"
|
||||
endingLineNumber = "247"
|
||||
startingLineNumber = "261"
|
||||
endingLineNumber = "261"
|
||||
landmarkName = "-audioPlayer:stateChanged:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -1081,11 +1081,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/Message/MessageTableViewCell.m"
|
||||
timestampString = "455713467.245974"
|
||||
timestampString = "456214264.873794"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "252"
|
||||
endingLineNumber = "252"
|
||||
startingLineNumber = "266"
|
||||
endingLineNumber = "266"
|
||||
landmarkName = "-audioPlayer:didEncounterError:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -1097,11 +1097,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/Message/MessageTableViewCell.m"
|
||||
timestampString = "455713467.245974"
|
||||
timestampString = "456214264.873794"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "257"
|
||||
endingLineNumber = "257"
|
||||
startingLineNumber = "271"
|
||||
endingLineNumber = "271"
|
||||
landmarkName = "-audioPlayer:didStartPlayingQueueItemId:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -1113,11 +1113,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/Message/MessageTableViewCell.m"
|
||||
timestampString = "455713467.245974"
|
||||
timestampString = "456214264.873794"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "261"
|
||||
endingLineNumber = "261"
|
||||
startingLineNumber = "275"
|
||||
endingLineNumber = "275"
|
||||
landmarkName = "-audioPlayer:didFinishBufferingSourceWithQueueItemId:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -1129,11 +1129,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/Message/MessageTableViewCell.m"
|
||||
timestampString = "455713467.245974"
|
||||
timestampString = "456214264.873794"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "262"
|
||||
endingLineNumber = "262"
|
||||
startingLineNumber = "276"
|
||||
endingLineNumber = "276"
|
||||
landmarkName = "-audioPlayer:didFinishBufferingSourceWithQueueItemId:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -1145,11 +1145,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/Message/MessageTableViewCell.m"
|
||||
timestampString = "455713467.245974"
|
||||
timestampString = "456214264.873794"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "267"
|
||||
endingLineNumber = "267"
|
||||
startingLineNumber = "281"
|
||||
endingLineNumber = "281"
|
||||
landmarkName = "-audioPlayer:didFinishPlayingQueueItemId:withReason:andProgress:andDuration:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -1161,11 +1161,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/Message/MessageTableViewCell.m"
|
||||
timestampString = "455713467.245974"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "102"
|
||||
endingLineNumber = "102"
|
||||
startingLineNumber = "115"
|
||||
endingLineNumber = "115"
|
||||
landmarkName = "-tick"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -2041,11 +2041,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/My/PersonalInfoViewController.m"
|
||||
timestampString = "456130232.856231"
|
||||
timestampString = "456156474.252497"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "124"
|
||||
endingLineNumber = "124"
|
||||
startingLineNumber = "130"
|
||||
endingLineNumber = "130"
|
||||
landmarkName = "-loadData"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -2085,32 +2085,16 @@
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/User/PersonalTopView.m"
|
||||
timestampString = "456128789.948155"
|
||||
timestampString = "456201133.829127"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "79"
|
||||
endingLineNumber = "79"
|
||||
landmarkName = "-imageBtnClick:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/User/PersonalTopView.m"
|
||||
timestampString = "456128789.948155"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "62"
|
||||
endingLineNumber = "62"
|
||||
landmarkName = "-voiceBtnClick:"
|
||||
startingLineNumber = "64"
|
||||
endingLineNumber = "64"
|
||||
landmarkName = "-setuserInfoViewModel:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
@@ -2121,11 +2105,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/User/PersonalTopView.m"
|
||||
timestampString = "455781238.68549"
|
||||
timestampString = "456201133.829127"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "24"
|
||||
endingLineNumber = "24"
|
||||
startingLineNumber = "26"
|
||||
endingLineNumber = "26"
|
||||
landmarkName = "-awakeFromNib"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -2133,32 +2117,16 @@
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/User/PersonalTopView.m"
|
||||
timestampString = "456128789.948155"
|
||||
timestampString = "456201133.829127"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "59"
|
||||
endingLineNumber = "59"
|
||||
landmarkName = "-avatarBtnClick:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/User/PersonalTopView.m"
|
||||
timestampString = "456128789.948155"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "95"
|
||||
endingLineNumber = "95"
|
||||
landmarkName = "-attentionBtnClick:"
|
||||
startingLineNumber = "61"
|
||||
endingLineNumber = "61"
|
||||
landmarkName = "-setuserInfoViewModel:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
@@ -2169,11 +2137,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456026339.189984"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "131"
|
||||
endingLineNumber = "131"
|
||||
startingLineNumber = "133"
|
||||
endingLineNumber = "133"
|
||||
landmarkName = "-loadData"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -2185,11 +2153,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456026339.990015"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "129"
|
||||
endingLineNumber = "129"
|
||||
startingLineNumber = "131"
|
||||
endingLineNumber = "131"
|
||||
landmarkName = "-loadData"
|
||||
landmarkType = "5">
|
||||
<Locations>
|
||||
@@ -2233,11 +2201,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456026340.397798"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "128"
|
||||
endingLineNumber = "128"
|
||||
startingLineNumber = "130"
|
||||
endingLineNumber = "130"
|
||||
landmarkName = "-loadData"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -2265,45 +2233,45 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456026763.299717"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "108"
|
||||
endingLineNumber = "108"
|
||||
landmarkName = "-requirePraiseUser"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "105"
|
||||
endingLineNumber = "105"
|
||||
landmarkName = "-requirePraiseUser"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "106"
|
||||
endingLineNumber = "106"
|
||||
landmarkName = "-requirePraiseUser"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456026804.166129"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "103"
|
||||
endingLineNumber = "103"
|
||||
landmarkName = "-requirePraiseUser"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456026804.705981"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "104"
|
||||
endingLineNumber = "104"
|
||||
landmarkName = "-requirePraiseUser"
|
||||
landmarkType = "5">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "No"
|
||||
@@ -2345,11 +2313,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456026862.111478"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "130"
|
||||
endingLineNumber = "130"
|
||||
startingLineNumber = "132"
|
||||
endingLineNumber = "132"
|
||||
landmarkName = "-loadData"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -2370,38 +2338,6 @@
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456067283.82546"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "232"
|
||||
endingLineNumber = "232"
|
||||
landmarkName = "-tableView:didSelectRowAtIndexPath:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456067283.82546"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "231"
|
||||
endingLineNumber = "231"
|
||||
landmarkName = "-tableView:didSelectRowAtIndexPath:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
@@ -2425,11 +2361,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456067283.82546"
|
||||
timestampString = "456214002.949678"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "222"
|
||||
endingLineNumber = "222"
|
||||
startingLineNumber = "224"
|
||||
endingLineNumber = "224"
|
||||
landmarkName = "-tableView:cellForRowAtIndexPath:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -2489,11 +2425,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/My/PersonalInfoViewController.m"
|
||||
timestampString = "456130232.856231"
|
||||
timestampString = "456156474.252497"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "119"
|
||||
endingLineNumber = "119"
|
||||
startingLineNumber = "125"
|
||||
endingLineNumber = "125"
|
||||
landmarkName = "-loadData"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@@ -2517,18 +2453,194 @@
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/User/PersonalTopView.m"
|
||||
timestampString = "456128789.948155"
|
||||
timestampString = "456201133.829127"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "56"
|
||||
endingLineNumber = "56"
|
||||
startingLineNumber = "58"
|
||||
endingLineNumber = "58"
|
||||
landmarkName = "-setuserInfoViewModel:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/User/PersonalTopView.m"
|
||||
timestampString = "456201133.829127"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "130"
|
||||
endingLineNumber = "130"
|
||||
landmarkName = "-imageBtnClick:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/Views/User/PersonalTopView.m"
|
||||
timestampString = "456201133.829127"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "68"
|
||||
endingLineNumber = "68"
|
||||
landmarkName = "-setuserInfoViewModel:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/My/PersonalInfoViewController.m"
|
||||
timestampString = "456156517.360693"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "161"
|
||||
endingLineNumber = "161"
|
||||
landmarkName = "-loadData"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/My/PersonalInfoViewController.m"
|
||||
timestampString = "456156474.252497"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "50"
|
||||
endingLineNumber = "50"
|
||||
landmarkName = "-viewDidLoad"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewModels/Common/UserViewModel.m"
|
||||
timestampString = "456201387.947592"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "27"
|
||||
endingLineNumber = "27"
|
||||
landmarkName = "-initWithDictionary:error:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewModels/Common/UserViewModel.m"
|
||||
timestampString = "456201387.947592"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "24"
|
||||
endingLineNumber = "24"
|
||||
landmarkName = "+JSONKeyPathsByPropertyKey"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewModels/Common/UserViewModel.m"
|
||||
timestampString = "456201588.71059"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "30"
|
||||
endingLineNumber = "30"
|
||||
landmarkName = "-initWithDictionary:error:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Note/NoteCommentViewController.m"
|
||||
timestampString = "456212684.376134"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "34"
|
||||
endingLineNumber = "34"
|
||||
landmarkName = "-viewDidLoad"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Message/MessageCommentViewController.m"
|
||||
timestampString = "456212993.996056"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "39"
|
||||
endingLineNumber = "39"
|
||||
landmarkName = "-viewDidLoad"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Message/MessageCommentViewController.m"
|
||||
timestampString = "456214095.079766"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "138"
|
||||
endingLineNumber = "138"
|
||||
landmarkName = "-loadData"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Ash_AWord/ViewControllers/Message/MessageCommentViewController.m"
|
||||
timestampString = "456212991.592321"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "34"
|
||||
endingLineNumber = "34"
|
||||
landmarkName = "-initWithNibName:bundle:"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
</Breakpoints>
|
||||
</Bucket>
|
||||
|
||||
@@ -100,4 +100,8 @@
|
||||
#define DefaultUserIcon [UIImage imageNamed:@"defaultUserIcon"]
|
||||
|
||||
#define DefaultPageSize 20
|
||||
typedef enum{
|
||||
Image_Type = 0,
|
||||
Voice_Type = 1,
|
||||
}CommentType;
|
||||
#endif
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
|
||||
}
|
||||
if (buttonIndex == 1) {
|
||||
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
|
||||
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
|
||||
|
||||
}
|
||||
if(buttonIndex == 2)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// MessageCommentViewController.h
|
||||
// Ash_AWord
|
||||
//
|
||||
// Created by xmfish on 15/6/17.
|
||||
// Copyright (c) 2015年 ash. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "BaseRefreshViewController.h"
|
||||
@class Text_Voice;
|
||||
@interface MessageCommentViewController : BaseRefreshViewController
|
||||
@property (weak, nonatomic) IBOutlet UITableView *tableView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *commentBtn;
|
||||
- (IBAction)commentBtnClick:(id)sender;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lineHeight;
|
||||
@property (weak, nonatomic) IBOutlet UIView *lineView;
|
||||
@property (strong, nonatomic)Text_Voice* text_Voice;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,254 @@
|
||||
//
|
||||
// MessageCommentViewController.m
|
||||
// Ash_AWord
|
||||
//
|
||||
// Created by xmfish on 15/6/17.
|
||||
// Copyright (c) 2015年 ash. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MessageCommentViewController.h"
|
||||
#import "MessageTableViewCell.h"
|
||||
#import "CommentTextView.h"
|
||||
#import "CommentGoodListCellTableViewCell.h"
|
||||
#import "PraiseUserListViewController.h"
|
||||
#import "MessageViewModel.h"
|
||||
#import "UserViewModel.h"
|
||||
#import "CommentViewModel.h"
|
||||
#import "CommentTableViewCell.h"
|
||||
@interface MessageCommentViewController ()
|
||||
{
|
||||
MessageTableViewCell* _headView;
|
||||
CommentTextView* _commentTextView;
|
||||
CommentGoodListCellTableViewCell* _commentGoodListCellTableViewCell;
|
||||
NSInteger _page;
|
||||
NSMutableArray* _commentInfoArr;
|
||||
BOOL _isFirstLoad;
|
||||
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation MessageCommentViewController
|
||||
|
||||
-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
return [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
}
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
_page = 1;
|
||||
_isFirstLoad = YES;
|
||||
|
||||
_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:@"MessageTableViewCell"];
|
||||
[_headView setText_Voice:_text_Voice];
|
||||
CGFloat height = [MessageTableViewCell heightWith:_text_Voice];
|
||||
_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);
|
||||
|
||||
__weak MessageCommentViewController* weakSelf = self;
|
||||
[_commentGoodListCellTableViewCell setShowPraiseList:^(void){
|
||||
PraiseUserListViewController *praiseUserListViewController = [[PraiseUserListViewController alloc] init];
|
||||
praiseUserListViewController.hidesBottomBarWhenPushed = YES;
|
||||
praiseUserListViewController.recordId = weakSelf.text_Voice.messageId;
|
||||
praiseUserListViewController.userListType = UserList_Praise_Type;
|
||||
praiseUserListViewController.commentType = Voice_Type;
|
||||
[weakSelf.navigationController pushViewController:praiseUserListViewController animated:YES];
|
||||
}
|
||||
];
|
||||
[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;
|
||||
_commentTextView.commentType = Voice_Type;
|
||||
|
||||
[_commentTextView setComentComplete:^(){
|
||||
[weakSelf headerBeginRefreshing];
|
||||
}];
|
||||
[self.view addSubview:_commentTextView];
|
||||
_commentTextView.recordId = _text_Voice.messageId;
|
||||
_commentTextView.aothourId = _text_Voice.ownerId;
|
||||
[_commentTextView setHidden:YES];
|
||||
|
||||
|
||||
[self loadData];
|
||||
[self requirePraiseUser];
|
||||
|
||||
}
|
||||
-(void)requirePraiseUser
|
||||
{
|
||||
PropertyEntity* pro = [UserViewModel requireLoadPraiseUserWithRecordId:_text_Voice.messageId withPage:1 withPage_size:10 withType:Voice_Type];
|
||||
[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_Voice.messageId withPage:_page withPage_size:DefaultPageSize WithType:Voice_Type];
|
||||
[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];
|
||||
if (_isFirstLoad) {
|
||||
CGPoint point = self.tableView.contentOffset;
|
||||
point.y = _headView.frame.size.height;
|
||||
[self.tableView setContentOffset:point animated:YES];
|
||||
|
||||
_isFirstLoad = NO;
|
||||
}
|
||||
|
||||
|
||||
} 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];
|
||||
BOOL isReplyOwnew = YES;
|
||||
if (![commentInfoViewModel.toUserId isEqualToString:_text_Voice.ownerId]) {
|
||||
isReplyOwnew = NO;
|
||||
}
|
||||
return [CommentTableViewCell getHeightWithCommentInfoViewModel:commentInfoViewModel isReplyOwner:isReplyOwnew];
|
||||
|
||||
}
|
||||
-(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",(long)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.ownerId = _text_Voice.ownerId;
|
||||
[cell setCommentWithUid:^(NSString* ownerId){
|
||||
[_commentTextView showWithUid:ownerId];
|
||||
}];
|
||||
[cell setCommentInfoViewModel:commentInfoViewModel];
|
||||
return cell;
|
||||
|
||||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
CommentInfoViewModel* commentInfoViewModel = [_commentInfoArr objectAtIndex:indexPath.row];
|
||||
[_commentTextView showWithUid:commentInfoViewModel.ownerId];
|
||||
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
- (IBAction)commentBtnClick:(id)sender {
|
||||
[_commentTextView showWithUid:_text_Voice.ownerId];
|
||||
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,78 @@
|
||||
<?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" customClass="MessageCommentViewController">
|
||||
<connections>
|
||||
<outlet property="commentBtn" destination="wwQ-1P-XKl" id="eE9-Tn-XkI"/>
|
||||
<outlet property="lineHeight" destination="aTY-JS-9CM" id="s08-Ph-0zp"/>
|
||||
<outlet property="lineView" destination="UYB-oq-18N" id="MP1-eF-upi"/>
|
||||
<outlet property="tableView" destination="XdA-0X-DEU" id="lQv-Ao-9uT"/>
|
||||
<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="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="XdA-0X-DEU">
|
||||
<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="Pkv-sa-AAw">
|
||||
<rect key="frame" x="0.0" y="524" width="320" height="44"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UYB-oq-18N">
|
||||
<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="aTY-JS-9CM"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wwQ-1P-XKl">
|
||||
<rect key="frame" x="8" y="5" width="304" height="35"/>
|
||||
<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="9WQ-aJ-KS4"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="wwQ-1P-XKl" secondAttribute="trailing" constant="8" id="7l4-mS-LAB"/>
|
||||
<constraint firstItem="wwQ-1P-XKl" firstAttribute="leading" secondItem="Pkv-sa-AAw" secondAttribute="leading" constant="8" id="HnG-Jc-Scs"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="44" id="Ho4-SY-hhA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="wwQ-1P-XKl" secondAttribute="bottom" constant="4" id="MRF-fJ-FtE"/>
|
||||
<constraint firstItem="wwQ-1P-XKl" firstAttribute="top" secondItem="UYB-oq-18N" secondAttribute="bottom" constant="4" id="PCp-zq-yqg"/>
|
||||
<constraint firstItem="UYB-oq-18N" firstAttribute="leading" secondItem="Pkv-sa-AAw" secondAttribute="leading" id="TQp-A6-4MY"/>
|
||||
<constraint firstAttribute="trailing" secondItem="UYB-oq-18N" secondAttribute="trailing" id="VHb-mD-hJS"/>
|
||||
<constraint firstItem="UYB-oq-18N" firstAttribute="top" secondItem="Pkv-sa-AAw" secondAttribute="top" id="q1m-4S-8rT"/>
|
||||
<constraint firstAttribute="height" constant="44" id="vwY-Lm-GFn"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="XdA-0X-DEU" secondAttribute="bottom" constant="44" id="0iG-Yt-OVJ"/>
|
||||
<constraint firstItem="Pkv-sa-AAw" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="1O7-bR-5fP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Pkv-sa-AAw" secondAttribute="trailing" id="77O-k2-FsB"/>
|
||||
<constraint firstItem="XdA-0X-DEU" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="9B6-we-J0r"/>
|
||||
<constraint firstAttribute="trailing" secondItem="XdA-0X-DEU" secondAttribute="trailing" id="GgD-Jx-sNx"/>
|
||||
<constraint firstItem="XdA-0X-DEU" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="afg-Sa-yzT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Pkv-sa-AAw" secondAttribute="bottom" id="eXJ-su-Yvz"/>
|
||||
</constraints>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -11,6 +11,9 @@
|
||||
@interface PersonalInfoViewController : BaseRefreshViewController
|
||||
@property (weak, nonatomic) IBOutlet UITableView *tableView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *topViewImage;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *tableBottomHeight;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *chatBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIView *bottomView;
|
||||
- (IBAction)chatBtnClick:(id)sender;
|
||||
@property (weak, nonatomic) IBOutlet UIView *lineView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lineHeight;
|
||||
|
||||
@@ -40,11 +40,17 @@
|
||||
_voicePage = 1;
|
||||
_playIndex = -1;
|
||||
|
||||
self.navigationItem.title = @"个人主页";
|
||||
|
||||
_imageArr = [[NSMutableArray alloc] init];
|
||||
_voiceArr = [[NSMutableArray alloc] init];
|
||||
|
||||
NSLog(@"%@",[AWordUser sharedInstance].uid);
|
||||
|
||||
if ([_otherUserId isEqualToString:[AWordUser sharedInstance].uid]) {
|
||||
_bottomView.hidden = YES;
|
||||
_tableBottomHeight.constant = 0.0;
|
||||
}
|
||||
self.tableView.hidden = YES;
|
||||
|
||||
[DejalActivityView activityViewForView:self.view withLabel:kLoadingTips];
|
||||
@@ -152,10 +158,11 @@
|
||||
}else{
|
||||
PropertyEntity* pro ;
|
||||
if (_otherUserId && [_otherUserId isEqualToString:[AWordUser sharedInstance].uid]) {
|
||||
pro = [MessageViewModel requireOhterWithOrder_by:Order_by_Time withPage:_voicePage withPage_size:DefaultPageSize withOtherId:_otherUserId];
|
||||
pro = [MessageViewModel requireMyWithOrder_by:Order_by_Time withPage:_voicePage withPage_size:DefaultPageSize];
|
||||
|
||||
|
||||
}else{
|
||||
pro = [MessageViewModel requireMyWithOrder_by:Order_by_Time withPage:_voicePage withPage_size:DefaultPageSize];
|
||||
pro = [MessageViewModel requireOhterWithOrder_by:Order_by_Time withPage:_voicePage withPage_size:DefaultPageSize withOtherId:_otherUserId];
|
||||
|
||||
}
|
||||
[RequireEngine requireWithProperty:pro completionBlock:^(id viewModel) {
|
||||
|
||||
@@ -7,8 +7,11 @@
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PersonalInfoViewController">
|
||||
<connections>
|
||||
<outlet property="bottomView" destination="RfR-Wi-Dtb" id="C7A-t4-zjq"/>
|
||||
<outlet property="chatBtn" destination="sYY-oG-2Ed" id="Qhh-BN-RPI"/>
|
||||
<outlet property="lineHeight" destination="fMj-Nw-YKG" id="1sh-5r-9If"/>
|
||||
<outlet property="lineView" destination="mGD-VK-ptG" id="2U2-Ph-hHL"/>
|
||||
<outlet property="tableBottomHeight" destination="4gb-ko-rFl" id="zAK-qY-CmQ"/>
|
||||
<outlet property="tableView" destination="tLB-Tb-fTR" id="ZsR-II-Hek"/>
|
||||
<outlet property="topViewImage" destination="FhV-5X-Wr2" id="0Dq-sQ-vjx"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
PraiseUserListViewController *praiseUserListViewController = [[PraiseUserListViewController alloc] init];
|
||||
praiseUserListViewController.hidesBottomBarWhenPushed = YES;
|
||||
praiseUserListViewController.recordId = weakSelf.text_image.messageId;
|
||||
praiseUserListViewController.userListType = UserList_Praise_Type;
|
||||
praiseUserListViewController.commentType = Image_Type;
|
||||
[weakSelf.navigationController pushViewController:praiseUserListViewController animated:YES];
|
||||
}
|
||||
];
|
||||
@@ -81,7 +83,7 @@
|
||||
|
||||
_commentTextView = [Ash_UIUtil instanceXibView:@"CommentTextView"];
|
||||
_commentTextView.frame = self.view.frame;
|
||||
|
||||
_commentTextView.commentType = Image_Type;
|
||||
[_commentTextView setComentComplete:^(){
|
||||
_isFirstLoad = YES;
|
||||
[weakSelf headerBeginRefreshing];
|
||||
@@ -100,7 +102,7 @@
|
||||
|
||||
-(void)requirePraiseUser
|
||||
{
|
||||
PropertyEntity* pro = [UserViewModel requireLoadPraiseUserWithRecordId:_text_image.messageId withPage:1 withPage_size:10];
|
||||
PropertyEntity* pro = [UserViewModel requireLoadPraiseUserWithRecordId:_text_image.messageId withPage:1 withPage_size:10 withType:Image_Type];
|
||||
[RequireEngine requireWithProperty:pro completionBlock:^(id viewModel) {
|
||||
if ([viewModel success]) {
|
||||
[_commentGoodListCellTableViewCell setUserInfoArr:[(UserViewModel*)viewModel userInfoArr]];
|
||||
|
||||
@@ -7,10 +7,19 @@
|
||||
//
|
||||
|
||||
#import "BaseRefreshViewController.h"
|
||||
typedef enum {
|
||||
UserList_Praise_Type = 1, //点赞列表
|
||||
UserList_Attention_Type = 2, //关注列表
|
||||
UserList_Fans_Type = 3, //粉丝列表
|
||||
}UserList_Type;
|
||||
|
||||
@interface PraiseUserListViewController : BaseRefreshViewController
|
||||
@property (weak, nonatomic) IBOutlet UITableView *tableView;
|
||||
|
||||
@property(assign, nonatomic)NSInteger recordId;
|
||||
@property(strong, nonatomic)NSString* targetId;
|
||||
@property(strong, nonatomic)NSArray* firstPraiseUserArr;
|
||||
|
||||
@property(assign, nonatomic)UserList_Type userListType;
|
||||
@property(assign, nonatomic)CommentType commentType;
|
||||
@end
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#import "PraiseUserListViewController.h"
|
||||
#import "PraiseUserListTableViewCell.h"
|
||||
#import "UserViewModel.h"
|
||||
|
||||
#import "PersonalInfoViewController.h"
|
||||
@interface PraiseUserListViewController ()
|
||||
{
|
||||
NSInteger _page;
|
||||
@@ -22,7 +22,14 @@
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
self.navigationItem.title = @"最近点赞的用户";
|
||||
|
||||
self.navigationItem.title = @"最近点赞";
|
||||
if (_userListType == UserList_Attention_Type) {
|
||||
self.navigationItem.title = @"关注";
|
||||
}else if(_userListType == UserList_Fans_Type){
|
||||
self.navigationItem.title = @"粉丝";
|
||||
|
||||
}
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
|
||||
@@ -60,7 +67,16 @@
|
||||
-(void)loadData
|
||||
{
|
||||
|
||||
PropertyEntity* pro = [UserViewModel requireLoadPraiseUserWithRecordId:_recordId withPage:1 withPage_size:DefaultPageSize];
|
||||
PropertyEntity* pro;
|
||||
if (_userListType == UserList_Praise_Type) {
|
||||
pro = [UserViewModel requireLoadPraiseUserWithRecordId:_recordId withPage:_page withPage_size:DefaultPageSize withType:_commentType];
|
||||
}else if (_userListType == UserList_Attention_Type){
|
||||
pro = [UserViewModel requireLoadUserListWithTargetUid:_targetId withType:1 withPage:_page withPage_size:DefaultPageSize];
|
||||
}else{
|
||||
pro = [UserViewModel requireLoadUserListWithTargetUid:_targetId withType:2 withPage:_page withPage_size:DefaultPageSize];
|
||||
|
||||
}
|
||||
|
||||
[RequireEngine requireWithProperty:pro completionBlock:^(id viewModel) {
|
||||
if ([viewModel success]) {
|
||||
UserViewModel* userViewModel = (UserViewModel*)viewModel;
|
||||
@@ -138,6 +154,11 @@
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
UserInfoViewModel* userInfoViewModel = [_dataArr objectAtIndex:indexPath.row];
|
||||
PersonalInfoViewController* personalInfoViewController = [[PersonalInfoViewController alloc] init];
|
||||
personalInfoViewController.hidesBottomBarWhenPushed = YES;
|
||||
personalInfoViewController.otherUserId = userInfoViewModel.uid;
|
||||
[self.navigationController pushViewController:personalInfoViewController animated:YES];
|
||||
}
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
@@ -7,10 +7,7 @@
|
||||
//
|
||||
|
||||
#import "BaseViewModel.h"
|
||||
typedef enum{
|
||||
Image_Type = 0,
|
||||
Voice_Type = 1,
|
||||
}CommentType;
|
||||
|
||||
@interface CommentInfoViewModel : BaseViewModel
|
||||
@property (nonatomic, strong) NSString *commentId;
|
||||
@property (nonatomic, strong) NSString *ownerId;
|
||||
|
||||
@@ -24,10 +24,14 @@
|
||||
@end
|
||||
|
||||
@interface UserViewModel : BaseViewModel
|
||||
@property (nonatomic, strong) NSArray *userInfoArr;;
|
||||
@property (nonatomic, strong) NSArray *userInfoArr;
|
||||
@property (nonatomic, strong) NSArray *friendUserArr;
|
||||
@property (nonatomic, strong)UserInfoViewModel* userInfo;
|
||||
@property (nonatomic, assign)NSInteger relation;//与当前用户关系。0:没有关系,1:已关注此人,2:已被此人关注,3:相互关注(如果是获取自己的个人信息,可以无视该项0.0)
|
||||
+(PropertyEntity*)requireLoadPraiseUserWithRecordId:(NSInteger)recordId withPage:(NSInteger)page withPage_size:(NSInteger)page_size;
|
||||
+(PropertyEntity*)requireLoadPraiseUserWithRecordId:(NSInteger)recordId withPage:(NSInteger)page withPage_size:(NSInteger)page_size withType:(CommentType)type;
|
||||
|
||||
+(PropertyEntity*)requireUserInfoWithTargetUid:(NSString*)targetUid;
|
||||
|
||||
+(PropertyEntity*)requireLoadUserListWithTargetUid:(NSString*)targetUid withType:(NSInteger)isAttention withPage:(NSInteger)page withPage_size:(NSInteger)page_size; // 1是关注列表,2是粉丝列表
|
||||
+(PropertyEntity*)requireAttentionWithTargetUid:(NSString*)targetUid withIsAttention:(BOOL)isAttention;
|
||||
@end
|
||||
|
||||
@@ -19,22 +19,30 @@
|
||||
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
|
||||
NSMutableDictionary* dic = [NSMutableDictionary dictionaryWithDictionary:[super JSONKeyPathsByPropertyKey]];
|
||||
[dic setObject:@"users" forKey:@"userInfoArr"];
|
||||
[dic setObject:@"friends" forKey:@"friendUserArr"];
|
||||
[dic setObject:@"userinfo" forKey:@"userInfo"];
|
||||
return dic;
|
||||
}
|
||||
- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error {
|
||||
self = [super initWithDictionary:dictionaryValue error:error];
|
||||
if (self == nil) return nil;
|
||||
if (self != nil){
|
||||
if (_friendUserArr && !_userInfoArr) {
|
||||
_userInfoArr = _friendUserArr;
|
||||
}
|
||||
};
|
||||
|
||||
return self;
|
||||
}
|
||||
+ (NSValueTransformer *)userInfoArrJSONTransformer{
|
||||
return [NSValueTransformer mtl_JSONArrayTransformerWithModelClass:UserInfoViewModel.class];
|
||||
}
|
||||
+ (NSValueTransformer *)friendUserArrJSONTransformer{
|
||||
return [NSValueTransformer mtl_JSONArrayTransformerWithModelClass:UserInfoViewModel.class];
|
||||
}
|
||||
+ (NSValueTransformer *)userInfoJSONTransformer{
|
||||
return [NSValueTransformer mtl_JSONDictionaryTransformerWithModelClass:UserInfoViewModel.class];
|
||||
}
|
||||
+(PropertyEntity*)requireLoadPraiseUserWithRecordId:(NSInteger)recordId withPage:(NSInteger)page withPage_size:(NSInteger)page_size
|
||||
+(PropertyEntity*)requireLoadPraiseUserWithRecordId:(NSInteger)recordId withPage:(NSInteger)page withPage_size:(NSInteger)page_size withType:(CommentType)type
|
||||
{
|
||||
PropertyEntity *pro = [[PropertyEntity alloc] init];
|
||||
pro.requireType = HTTPRequestTypeWithPOSTDATA;
|
||||
@@ -45,8 +53,13 @@
|
||||
@"page": [NSString stringWithFormat:@"%ld",page],
|
||||
@"pageSize": [NSString stringWithFormat:@"%ld",page_size],
|
||||
};
|
||||
|
||||
NSString* command = @"20008";
|
||||
if (type == Voice_Type) {
|
||||
command = @"30008";
|
||||
}
|
||||
pro.pro = @{@"root": dic,
|
||||
@"command": @"20008",
|
||||
@"command": command,
|
||||
};
|
||||
return pro;
|
||||
}
|
||||
@@ -64,4 +77,42 @@
|
||||
};
|
||||
return pro;
|
||||
}
|
||||
|
||||
+(PropertyEntity*)requireAttentionWithTargetUid:(NSString *)targetUid withIsAttention:(BOOL)isAttention
|
||||
{
|
||||
PropertyEntity *pro = [[PropertyEntity alloc] init];
|
||||
pro.requireType = HTTPRequestTypeWithPOSTDATA;
|
||||
pro.responesOBJ = self.class;
|
||||
|
||||
NSString* command = @"10101";
|
||||
if (!isAttention) {
|
||||
command = @"10102";
|
||||
}
|
||||
NSDictionary* dic = @{@"targetUid": targetUid,
|
||||
};
|
||||
pro.pro = @{@"root": dic,
|
||||
@"command": command,
|
||||
};
|
||||
return pro;
|
||||
}
|
||||
+(PropertyEntity*)requireLoadUserListWithTargetUid:(NSString *)targetUid withType:(NSInteger)isAttention withPage:(NSInteger)page withPage_size:(NSInteger)page_size
|
||||
{
|
||||
PropertyEntity *pro = [[PropertyEntity alloc] init];
|
||||
pro.requireType = HTTPRequestTypeWithPOSTDATA;
|
||||
pro.responesOBJ = self.class;
|
||||
|
||||
|
||||
NSDictionary* dic = @{@"targetUid": targetUid,
|
||||
@"page": [NSString stringWithFormat:@"%ld",page],
|
||||
@"pageSize": [NSString stringWithFormat:@"%ld",page_size],
|
||||
};
|
||||
NSString* command = @"10103";
|
||||
if (isAttention == 2) {
|
||||
command = @"10104";
|
||||
}
|
||||
pro.pro = @{@"root": dic,
|
||||
@"command": command,
|
||||
};
|
||||
return pro;
|
||||
}
|
||||
@end
|
||||
@@ -22,6 +22,8 @@
|
||||
@property (nonatomic, assign)NSInteger shareCount;
|
||||
@property (nonatomic, assign)NSInteger praiseCount;
|
||||
@property (nonatomic, assign)NSInteger messageId;
|
||||
@property (nonatomic, assign)NSInteger commentCount;
|
||||
|
||||
@end
|
||||
|
||||
@interface MessageViewModel : BaseViewModel
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
@"ownerName" : @"ownerName",
|
||||
@"shareCount": @"shareCount",
|
||||
@"hasShared": @"hasShared",
|
||||
@"commentCount": @"commentCount",
|
||||
};
|
||||
}
|
||||
+ (NSValueTransformer *)voiceUrlJSONTransformer {
|
||||
|
||||
@@ -15,6 +15,7 @@ typedef void (^CommentComplete)(void);
|
||||
@property (nonatomic, assign) NSInteger recordId;
|
||||
@property (nonatomic, strong) NSString* aothourId;
|
||||
@property (nonatomic, strong) CommentComplete comentComplete;
|
||||
@property (nonatomic, assign)CommentType commentType;
|
||||
@property (weak, nonatomic) IBOutlet UITextView *contentTextView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *tipLabel;
|
||||
- (IBAction)cancelBtnClick:(id)sender;
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
if (!commentId) {
|
||||
commentId = _aothourId;
|
||||
}
|
||||
PropertyEntity* pro = [CommentViewModel requireAddCommentWithReconrdId:_recordId withContent:_contentTextView.text WithType:Image_Type withToUid:commentId];
|
||||
PropertyEntity* pro = [CommentViewModel requireAddCommentWithReconrdId:_recordId withContent:_contentTextView.text WithType:_commentType withToUid:commentId];
|
||||
[RequireEngine requireWithProperty:pro completionBlock:^(id viewModel) {
|
||||
[MBProgressHUD hideAllHUDsForView:nil animated:YES];
|
||||
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
@property (weak, nonatomic) IBOutlet UITextView *content;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIProgressView *timeProgressView;
|
||||
- (IBAction)commitBtnClick:(id)sender;
|
||||
- (IBAction)avatarBtnClick:(id)sender;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *commitBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nowTimeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *playBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *goodBtn;
|
||||
@@ -32,6 +34,8 @@
|
||||
@property (weak, nonatomic) IBOutlet UIButton *closeBtn;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *contentHeight;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *totalTimeLabel;
|
||||
@property (nonatomic, assign)BOOL isComment;
|
||||
|
||||
- (IBAction)playBtnClick:(id)sender;
|
||||
|
||||
-(void)stopPlay;
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#import "AppDelegate.h"
|
||||
#import "MyMessageViewController.h"
|
||||
#import "PersonalInfoViewController.h"
|
||||
#import "MessageCommentViewController.h"
|
||||
|
||||
@interface MessageTableViewCell()<AudioPlayerDelegate>
|
||||
@end
|
||||
@implementation MessageTableViewCell
|
||||
@@ -37,6 +39,9 @@
|
||||
_shareBtn.layer.masksToBounds = YES;
|
||||
_goodBtn.backgroundColor = [UIColor lineColor];
|
||||
_shareBtn.backgroundColor = [UIColor lineColor];
|
||||
_commitBtn.layer.cornerRadius = 3;
|
||||
_commitBtn.layer.masksToBounds = YES;
|
||||
_commitBtn.backgroundColor = [UIColor lineColor];
|
||||
|
||||
_audioPlayer = [[AudioPlayer alloc] init];
|
||||
_audioPlayer.delegate = self;
|
||||
@@ -47,7 +52,15 @@
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
-(void)setIsComment:(BOOL)isComment
|
||||
{
|
||||
if (isComment) {
|
||||
_commitBtn.hidden = YES;
|
||||
}else
|
||||
{
|
||||
_commitBtn.hidden = NO;
|
||||
}
|
||||
}
|
||||
- (IBAction)playBtnClick:(id)sender {
|
||||
if (_playBtn.selected == NO) {
|
||||
_playBtn.selected = YES;
|
||||
@@ -127,6 +140,7 @@
|
||||
[_goodBtn setTitle:[NSString stringWithFormat:@"%ld",(long)text_voice.praiseCount] forState:UIControlStateNormal];
|
||||
[_goodBtn setTitle:[NSString stringWithFormat:@"%ld",(long)text_voice.praiseCount] forState:UIControlStateSelected];
|
||||
[_shareBtn setTitle:[NSString stringWithFormat:@"%ld",(long)text_voice.shareCount] forState:UIControlStateNormal];
|
||||
[_commitBtn setTitle:[NSString stringWithFormat:@"%ld",(long)text_voice.commentCount] forState:UIControlStateNormal];
|
||||
|
||||
_closeBtn.hidden = YES;
|
||||
[self setGoodBtnSelect:text_voice.hasPraised];
|
||||
@@ -267,8 +281,15 @@
|
||||
[self updateControls];
|
||||
}
|
||||
|
||||
- (IBAction)commitBtnClick:(id)sender {
|
||||
MessageCommentViewController* messageCommentViewController = [[MessageCommentViewController alloc] init];
|
||||
messageCommentViewController.hidesBottomBarWhenPushed = YES;
|
||||
messageCommentViewController.text_Voice = _text_voice;
|
||||
[[AppDelegate visibleViewController].navigationController pushViewController:messageCommentViewController animated:YES];
|
||||
}
|
||||
|
||||
- (IBAction)avatarBtnClick:(id)sender {
|
||||
if (![_text_voice.ownerId isEqualToString:[AWordUser sharedInstance].uid] ) { PersonalInfoViewController* personalInfoViewController = [[PersonalInfoViewController alloc] init];
|
||||
if (![_text_voice.ownerId isEqualToString:[AWordUser sharedInstance].uid] ) { PersonalInfoViewController* personalInfoViewController = [[PersonalInfoViewController alloc] initWithNibName:@"NoteCommentViewController" bundle:nil];
|
||||
personalInfoViewController.hidesBottomBarWhenPushed = YES;
|
||||
personalInfoViewController.otherUserId = _text_voice.ownerId;
|
||||
[[AppDelegate visibleViewController].navigationController pushViewController:personalInfoViewController animated:YES];
|
||||
|
||||
@@ -8,33 +8,39 @@
|
||||
<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="152" id="KGk-i7-Jjw" customClass="MessageTableViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="155"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="162" id="KGk-i7-Jjw" customClass="MessageTableViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="165"/>
|
||||
<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="Mb7-Fd-CcX">
|
||||
<rect key="frame" x="8" y="8" width="24" height="24"/>
|
||||
<rect key="frame" x="8" y="8" width="36" height="36"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="24" id="Dct-Tr-Hx3"/>
|
||||
<constraint firstAttribute="height" constant="24" id="YI7-Jl-uDN"/>
|
||||
<constraint firstAttribute="width" constant="36" id="Dct-Tr-Hx3"/>
|
||||
<constraint firstAttribute="height" constant="36" id="YI7-Jl-uDN"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A4o-4F-Vj2">
|
||||
<rect key="frame" x="112" y="12" width="200" height="21"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12.335" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A4o-4F-Vj2">
|
||||
<rect key="frame" x="52" y="28" width="32" height="12"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="Kog-Jk-pSl"/>
|
||||
<constraint firstAttribute="width" constant="200" id="pSd-hM-Mw6"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<variation key="default">
|
||||
<mask key="constraints">
|
||||
<exclude reference="Kog-Jk-pSl"/>
|
||||
<exclude reference="pSd-hM-Mw6"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</label>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" text="内容" translatesAutoresizingMaskIntoConstraints="NO" id="Zgh-Pl-82c">
|
||||
<rect key="frame" x="2" y="34" width="318" height="27"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<rect key="frame" x="2" y="44" width="318" height="27"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="27" id="PIJ-QV-qOs"/>
|
||||
<constraint firstAttribute="height" constant="27" id="w4d-ER-9ON"/>
|
||||
@@ -43,16 +49,16 @@
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
</textView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="游客" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hjS-Gz-Iqz">
|
||||
<rect key="frame" x="40" y="10" width="280" height="21"/>
|
||||
<rect key="frame" x="52" y="10" width="268" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="hSd-8k-KI1"/>
|
||||
<constraint firstAttribute="height" constant="16" id="hSd-8k-KI1"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MZM-QI-Yfl">
|
||||
<rect key="frame" x="8" y="127" width="60" height="24"/>
|
||||
<rect key="frame" x="8" y="129" width="60" height="24"/>
|
||||
<color key="backgroundColor" red="0.86274509799999999" green="0.86274509799999999" blue="0.86274509799999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="60" id="Deb-Y7-Nn9"/>
|
||||
@@ -72,7 +78,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="na7-Ar-gFB">
|
||||
<rect key="frame" x="252" y="127" width="60" height="24"/>
|
||||
<rect key="frame" x="252" y="129" width="60" height="24"/>
|
||||
<color key="backgroundColor" red="0.86274509799999999" green="0.86274509799999999" blue="0.86274509799999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="24" id="SVl-I6-q0U"/>
|
||||
@@ -91,10 +97,10 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VwO-ue-f2e">
|
||||
<rect key="frame" x="8" y="8" width="24" height="30"/>
|
||||
<rect key="frame" x="8" y="8" width="36" height="36"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="24" id="0j2-aB-Wql"/>
|
||||
<constraint firstAttribute="height" constant="30" id="txZ-re-swc"/>
|
||||
<constraint firstAttribute="width" constant="36" id="0j2-aB-Wql"/>
|
||||
<constraint firstAttribute="height" constant="36" id="txZ-re-swc"/>
|
||||
</constraints>
|
||||
<state key="normal">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
@@ -119,7 +125,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4ns-uY-NCP">
|
||||
<rect key="frame" x="0.0" y="69" width="320" height="51"/>
|
||||
<rect key="frame" x="0.0" y="71" width="320" height="51"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="l1O-la-gtP">
|
||||
<rect key="frame" x="8" y="5" width="40" height="40"/>
|
||||
@@ -186,11 +192,33 @@
|
||||
<constraint firstAttribute="trailing" secondItem="Zt8-Ca-IHv" secondAttribute="trailing" constant="6" id="xfE-qL-8rK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UYQ-Ok-lXt">
|
||||
<rect key="frame" x="76" y="129" width="60" height="24"/>
|
||||
<color key="backgroundColor" red="0.86274509799999999" green="0.86274509799999999" blue="0.86274509799999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="24" id="Jaw-Vg-brP"/>
|
||||
<constraint firstAttribute="width" constant="60" id="dG5-Yf-l0Q"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<state key="normal" title="0" image="mainCellCommentN.png">
|
||||
<color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<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="commitBtnClick:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="N8R-es-C5e"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="Zgh-Pl-82c" secondAttribute="trailing" constant="-8" id="1EM-t1-EzZ"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="4ns-uY-NCP" secondAttribute="trailing" constant="-8" id="1pA-Ak-ACg"/>
|
||||
<constraint firstItem="Zgh-Pl-82c" firstAttribute="top" secondItem="VwO-ue-f2e" secondAttribute="bottom" id="9oq-Q2-zRm"/>
|
||||
<constraint firstItem="hjS-Gz-Iqz" firstAttribute="leading" secondItem="Mb7-Fd-CcX" secondAttribute="trailing" constant="8" id="BcF-qT-CDg"/>
|
||||
<constraint firstItem="4ns-uY-NCP" firstAttribute="top" secondItem="Zgh-Pl-82c" secondAttribute="bottom" id="BwO-1d-rvg"/>
|
||||
<constraint firstItem="Mb7-Fd-CcX" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" id="CYN-ty-UlC"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="4ns-uY-NCP" secondAttribute="bottom" constant="-9" id="Cw6-8i-Rth"/>
|
||||
<constraint firstItem="Mb7-Fd-CcX" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" id="D1A-fL-DnX"/>
|
||||
@@ -199,8 +227,12 @@
|
||||
<constraint firstItem="Zgh-Pl-82c" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="-6" id="IFH-Qj-baB"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="hjS-Gz-Iqz" secondAttribute="trailing" constant="-8" id="LDg-yd-xOx"/>
|
||||
<constraint firstItem="na7-Ar-gFB" firstAttribute="top" secondItem="4ns-uY-NCP" secondAttribute="bottom" constant="7" id="QCR-vb-nUW"/>
|
||||
<constraint firstItem="UYQ-Ok-lXt" firstAttribute="leading" secondItem="MZM-QI-Yfl" secondAttribute="trailing" constant="8" id="UmI-sq-ddE"/>
|
||||
<constraint firstItem="4ns-uY-NCP" firstAttribute="trailing" secondItem="hjS-Gz-Iqz" secondAttribute="trailing" id="UmU-ZZ-HPi"/>
|
||||
<constraint firstItem="A4o-4F-Vj2" firstAttribute="leading" secondItem="VwO-ue-f2e" secondAttribute="trailing" constant="8" id="cCc-0J-nbO"/>
|
||||
<constraint firstItem="MZM-QI-Yfl" firstAttribute="centerY" secondItem="UYQ-Ok-lXt" secondAttribute="centerY" id="edG-n3-C7x"/>
|
||||
<constraint firstItem="qq8-JV-KUD" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="-8" id="hNN-n1-uwf"/>
|
||||
<constraint firstItem="A4o-4F-Vj2" firstAttribute="top" secondItem="hjS-Gz-Iqz" secondAttribute="bottom" constant="2" id="ihA-dE-gSh"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="qq8-JV-KUD" secondAttribute="trailing" constant="-8" id="juy-gz-rn0"/>
|
||||
<constraint firstItem="na7-Ar-gFB" firstAttribute="trailing" secondItem="H2p-sc-9uM" secondAttribute="trailingMargin" id="jwS-N8-Vy2"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="Zgh-Pl-82c" secondAttribute="bottom" constant="30" id="oHE-kw-lMN"/>
|
||||
@@ -216,13 +248,19 @@
|
||||
<variation key="default">
|
||||
<mask key="constraints">
|
||||
<exclude reference="oHE-kw-lMN"/>
|
||||
<exclude reference="q1y-cr-NIe"/>
|
||||
<exclude reference="Dp0-tx-ZsJ"/>
|
||||
<exclude reference="ofv-4k-5DG"/>
|
||||
<exclude reference="Cw6-8i-Rth"/>
|
||||
<exclude reference="sXV-a9-U6y"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<connections>
|
||||
<outlet property="avatarImageView" destination="Mb7-Fd-CcX" id="jRc-HN-XrO"/>
|
||||
<outlet property="closeBtn" destination="qq8-JV-KUD" id="Rg0-Od-VHK"/>
|
||||
<outlet property="commitBtn" destination="UYQ-Ok-lXt" id="uji-qg-Rio"/>
|
||||
<outlet property="content" destination="Zgh-Pl-82c" id="vIu-k5-3Mf"/>
|
||||
<outlet property="contentHeight" destination="w4d-ER-9ON" id="9Jl-S6-NV2"/>
|
||||
<outlet property="goodBtn" destination="MZM-QI-Yfl" id="ben-Sv-Tby"/>
|
||||
@@ -234,14 +272,17 @@
|
||||
<outlet property="totalTimeLabel" destination="37K-Qh-x5V" id="avn-f5-ucC"/>
|
||||
<outlet property="userNameLabel" destination="hjS-Gz-Iqz" id="Jjo-vx-jJJ"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="140" y="196.5"/>
|
||||
<point key="canvasLocation" x="140" y="201.5"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="btn_bad_clicked.png" width="18" height="18"/>
|
||||
<image name="btn_share.png" width="18" height="18"/>
|
||||
<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"/>
|
||||
<image name="playButton.png" width="63" height="63"/>
|
||||
|
||||
@@ -202,11 +202,10 @@
|
||||
- (IBAction)avatarBtnClick:(id)sender {
|
||||
|
||||
|
||||
if (![_text_image.ownerId isEqualToString:[AWordUser sharedInstance].uid] ) { PersonalInfoViewController* personalInfoViewController = [[PersonalInfoViewController alloc] init];
|
||||
personalInfoViewController.hidesBottomBarWhenPushed = YES;
|
||||
personalInfoViewController.otherUserId = _text_image.ownerId;
|
||||
[[AppDelegate visibleViewController].navigationController pushViewController:personalInfoViewController animated:YES];
|
||||
}
|
||||
PersonalInfoViewController* personalInfoViewController = [[PersonalInfoViewController alloc] init];
|
||||
personalInfoViewController.hidesBottomBarWhenPushed = YES;
|
||||
personalInfoViewController.otherUserId = _text_image.ownerId;
|
||||
[[AppDelegate visibleViewController].navigationController pushViewController:personalInfoViewController animated:YES];
|
||||
}
|
||||
|
||||
- (IBAction)imageBtnClick:(id)sender {
|
||||
|
||||
@@ -15,6 +15,8 @@ typedef void (^IsSelectImage)(BOOL);
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *avatarBtn;
|
||||
- (IBAction)avatarBtnClick:(id)sender;
|
||||
- (IBAction)attentionListClick:(id)sender;
|
||||
- (IBAction)fansListClick:(id)sender;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *signatureLabel;
|
||||
- (IBAction)voiceBtnClick:(id)sender;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *voiceBtn;
|
||||
|
||||
@@ -8,9 +8,13 @@
|
||||
|
||||
#import "PersonalTopView.h"
|
||||
#import "UserViewModel.h"
|
||||
#import "PraiseUserListViewController.h"
|
||||
#import "AppDelegate.h"
|
||||
@implementation PersonalTopView
|
||||
{
|
||||
BOOL _isSelectImage;
|
||||
UserViewModel* _userViewModel;
|
||||
BOOL _isAttention;
|
||||
}
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
@@ -22,6 +26,7 @@
|
||||
-(void)awakeFromNib
|
||||
{
|
||||
_isSelectImage = YES;
|
||||
_isAttention = NO;
|
||||
|
||||
_line1.backgroundColor = [UIColor lineColor];
|
||||
_line2.backgroundColor = [UIColor lineColor];
|
||||
@@ -38,12 +43,14 @@
|
||||
|
||||
[_attentionBtn setTitleColor:[UIColor appMainColor] forState:UIControlStateNormal];
|
||||
_attentionBtn.layer.masksToBounds = YES;
|
||||
_attentionBtn.titleLabel.adjustsFontSizeToFitWidth = YES;
|
||||
_attentionBtn.layer.cornerRadius = 2.0;
|
||||
|
||||
}
|
||||
|
||||
-(void)setuserInfoViewModel:(UserViewModel *)userViewModel
|
||||
{
|
||||
_userViewModel = userViewModel;
|
||||
_nameLabel.text = userViewModel.userInfo.name;
|
||||
_attentionCountLabel.text = [NSString stringWithFormat:@"%ld",userViewModel.userInfo.followCount];
|
||||
_fansCountLabel.text = [NSString stringWithFormat:@"%ld",userViewModel.userInfo.followerCount];
|
||||
@@ -52,12 +59,43 @@
|
||||
}else{
|
||||
_signatureLabel.text = @"该用户暂时没有填写签名~";
|
||||
}
|
||||
if ([userViewModel.userInfo.uid isEqualToString:[AWordUser sharedInstance].uid] ) {
|
||||
_attentionBtn.hidden = YES;
|
||||
}else{
|
||||
_attentionBtn.hidden = NO;
|
||||
|
||||
}
|
||||
if (userViewModel.relation == 0 || userViewModel.relation == 2) {
|
||||
[_attentionBtn setTitle:@"关注" forState:UIControlStateNormal];
|
||||
_isAttention = NO;
|
||||
}else{
|
||||
[_attentionBtn setTitle:@"取消关注" forState:UIControlStateNormal];
|
||||
[_attentionBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
|
||||
_isAttention = YES;
|
||||
|
||||
}
|
||||
[_avatarBtn sd_setImageWithURL:[NSURL URLWithString:userViewModel.userInfo.figureurl] forState:UIControlStateNormal placeholderImage:DefaultUserIcon];
|
||||
}
|
||||
- (IBAction)avatarBtnClick:(id)sender {
|
||||
}
|
||||
|
||||
- (IBAction)attentionListClick:(id)sender {
|
||||
PraiseUserListViewController* praiseUserListViewController = [[PraiseUserListViewController alloc] init];
|
||||
praiseUserListViewController.targetId = _userViewModel.userInfo.uid;
|
||||
praiseUserListViewController.userListType = UserList_Attention_Type;
|
||||
praiseUserListViewController.hidesBottomBarWhenPushed = YES;
|
||||
[[AppDelegate visibleViewController].navigationController pushViewController:praiseUserListViewController animated:YES];
|
||||
|
||||
}
|
||||
|
||||
- (IBAction)fansListClick:(id)sender {
|
||||
PraiseUserListViewController* praiseUserListViewController = [[PraiseUserListViewController alloc] init];
|
||||
praiseUserListViewController.targetId = _userViewModel.userInfo.uid;
|
||||
praiseUserListViewController.userListType = UserList_Fans_Type;
|
||||
praiseUserListViewController.hidesBottomBarWhenPushed = YES;
|
||||
[[AppDelegate visibleViewController].navigationController pushViewController:praiseUserListViewController animated:YES];
|
||||
|
||||
}
|
||||
- (IBAction)voiceBtnClick:(id)sender {
|
||||
if (_isSelectImage == NO) {
|
||||
return;
|
||||
@@ -93,6 +131,27 @@
|
||||
}
|
||||
}
|
||||
- (IBAction)attentionBtnClick:(id)sender {
|
||||
PropertyEntity* pro;
|
||||
pro = [UserViewModel requireAttentionWithTargetUid:_userViewModel.userInfo.uid withIsAttention:!_isAttention];
|
||||
[RequireEngine requireWithProperty:pro completionBlock:^(id viewModel) {
|
||||
if ([viewModel success]) {
|
||||
if (!_isAttention) {
|
||||
[_attentionBtn setTitle:@"取消关注" forState:UIControlStateNormal];
|
||||
// [_attentionBtn setBackgroundColor:[UIColor lightGrayColor]];
|
||||
[_attentionBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
|
||||
|
||||
}else{
|
||||
[_attentionBtn setTitle:@"关注" forState:UIControlStateNormal];
|
||||
[_attentionBtn setTitleColor:[UIColor appMainColor] forState:UIControlStateNormal];
|
||||
|
||||
}
|
||||
_isAttention = !_isAttention;
|
||||
}else{
|
||||
[MBProgressHUD errorHudWithView:nil label:[viewModel errMessage] hidesAfter:1.0];
|
||||
}
|
||||
} failedBlock:^(NSError *error) {
|
||||
[MBProgressHUD errorHudWithView:nil label:kNetworkErrorTips hidesAfter:1.0];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -81,16 +81,16 @@
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aTY-fs-6Kn">
|
||||
<rect key="frame" x="249" y="12" width="0.0" height="0.0"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aTY-fs-6Kn">
|
||||
<rect key="frame" x="248" y="12" width="0.0" height="0.0"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dV9-mk-6So">
|
||||
<rect key="frame" x="300" y="12" width="0.0" height="0.0"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dV9-mk-6So">
|
||||
<rect key="frame" x="299" y="12" width="0.0" height="0.0"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QPy-Oj-huM">
|
||||
@@ -99,24 +99,54 @@
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EJx-4S-p4q">
|
||||
<rect key="frame" x="225" y="5" width="46" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="46" id="K9G-Tz-lmv"/>
|
||||
<constraint firstAttribute="height" constant="50" id="hcI-vv-WM9"/>
|
||||
</constraints>
|
||||
<state key="normal">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="attentionListClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="HJr-YE-QOe"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XUB-Kb-7VF">
|
||||
<rect key="frame" x="274" y="0.0" width="46" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="gLU-Nn-LMQ"/>
|
||||
</constraints>
|
||||
<state key="normal">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="fansListClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="uD2-89-Iwe"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="m9k-Q3-cil" secondAttribute="trailing" constant="8" id="1Ht-zi-USc"/>
|
||||
<constraint firstAttribute="trailing" secondItem="XUB-Kb-7VF" secondAttribute="trailing" id="2PV-hw-Z4M"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bUQ-vj-PQK" secondAttribute="trailing" id="383-FE-5Ov"/>
|
||||
<constraint firstItem="bSw-ar-jAL" firstAttribute="leading" secondItem="VjD-oC-vGz" secondAttribute="leading" id="6kG-3x-DIk"/>
|
||||
<constraint firstItem="sml-su-cYb" firstAttribute="top" secondItem="VjD-oC-vGz" secondAttribute="top" constant="8" id="7eW-ld-Mld"/>
|
||||
<constraint firstItem="e93-W1-QCy" firstAttribute="leading" secondItem="IPj-SU-Dm2" secondAttribute="trailing" id="9r3-e9-ydX"/>
|
||||
<constraint firstItem="e93-W1-QCy" firstAttribute="top" secondItem="bUQ-vj-PQK" secondAttribute="bottom" id="B2T-3J-enw"/>
|
||||
<constraint firstItem="sml-su-cYb" firstAttribute="leading" secondItem="EJx-4S-p4q" secondAttribute="trailing" constant="2" id="BV7-A8-Xyb"/>
|
||||
<constraint firstItem="dV9-mk-6So" firstAttribute="top" secondItem="VjD-oC-vGz" secondAttribute="top" constant="12" id="CGi-fG-rDQ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="QPy-Oj-huM" secondAttribute="trailing" constant="90" id="Dta-6v-Jn5"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bUQ-vj-PQK" secondAttribute="bottom" constant="40" id="Hk4-pW-yXl"/>
|
||||
<constraint firstItem="XUB-Kb-7VF" firstAttribute="top" secondItem="VjD-oC-vGz" secondAttribute="top" id="IO9-MP-bBs"/>
|
||||
<constraint firstItem="QPy-Oj-huM" firstAttribute="leading" secondItem="VjD-oC-vGz" secondAttribute="leading" constant="68" id="IX4-vS-cGU"/>
|
||||
<constraint firstItem="bUQ-vj-PQK" firstAttribute="leading" secondItem="VjD-oC-vGz" secondAttribute="leading" id="LGy-Jy-X0y"/>
|
||||
<constraint firstItem="dV9-mk-6So" firstAttribute="centerX" secondItem="m9k-Q3-cil" secondAttribute="centerX" id="Rk6-0W-3Mp"/>
|
||||
<constraint firstItem="sml-su-cYb" firstAttribute="leading" secondItem="akM-Ne-lUG" secondAttribute="trailing" constant="12" id="SgP-8a-trv"/>
|
||||
<constraint firstItem="XUB-Kb-7VF" firstAttribute="leading" secondItem="sml-su-cYb" secondAttribute="trailing" id="Uc7-sQ-m1H"/>
|
||||
<constraint firstAttribute="trailing" secondItem="e93-W1-QCy" secondAttribute="trailing" id="WfD-YG-GPC"/>
|
||||
<constraint firstItem="akM-Ne-lUG" firstAttribute="top" secondItem="VjD-oC-vGz" secondAttribute="top" constant="30" id="XUG-cP-eFN"/>
|
||||
<constraint firstItem="EJx-4S-p4q" firstAttribute="top" secondItem="QPy-Oj-huM" secondAttribute="bottom" id="Y4p-YR-1YM"/>
|
||||
<constraint firstAttribute="bottom" secondItem="e93-W1-QCy" secondAttribute="bottom" id="ZhN-Ci-RXq"/>
|
||||
<constraint firstItem="aTY-fs-6Kn" firstAttribute="top" secondItem="VjD-oC-vGz" secondAttribute="top" constant="12" id="ajb-eU-ta5"/>
|
||||
<constraint firstItem="QPy-Oj-huM" firstAttribute="top" secondItem="VjD-oC-vGz" secondAttribute="top" constant="5" id="cua-ST-0Gs"/>
|
||||
@@ -152,7 +182,7 @@
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<color key="shadowColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="shadowColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<size key="shadowOffset" width="1" height="0.0"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bTo-Vv-aD5">
|
||||
|
||||
Reference in New Issue
Block a user