├── .DS_Store ├── Podfile.lock ├── Pods ├── Manifest.lock ├── Target Support Files │ └── Pods-DynamicCircle │ │ ├── Pods-DynamicCircle-dummy.m │ │ ├── Pods-DynamicCircle-acknowledgements.markdown │ │ ├── Pods-DynamicCircle.debug.xcconfig │ │ ├── Pods-DynamicCircle.release.xcconfig │ │ ├── Pods-DynamicCircle-acknowledgements.plist │ │ ├── Pods-DynamicCircle-resources.sh │ │ └── Pods-DynamicCircle-frameworks.sh └── Pods.xcodeproj │ ├── xcuserdata │ └── zhangjiong.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── Pods-DynamicCircle.xcscheme │ └── project.pbxproj ├── DynamicCircle ├── .DS_Store ├── Assets.xcassets │ ├── Contents.json │ ├── Dynamic │ │ ├── Contents.json │ │ ├── .DS_Store │ │ ├── icon_circle_like.imageset │ │ │ ├── icon_circle_like@2x.png │ │ │ ├── icon_circle_like@3x.png │ │ │ └── Contents.json │ │ ├── icon_circle_open.imageset │ │ │ ├── icon_circle_open@2x.png │ │ │ ├── icon_circle_open@3x.png │ │ │ └── Contents.json │ │ ├── loading_commodity.imageset │ │ │ ├── loading_commodity@2x.png │ │ │ ├── loading_commodity@3x.png │ │ │ └── Contents.json │ │ ├── icon_circle_triangle.imageset │ │ │ ├── icon_circle_triangle@2x.png │ │ │ ├── icon_circle_triangle@3x.png │ │ │ └── Contents.json │ │ ├── icon_default_avatar.imageset │ │ │ ├── icon_default_avatar@2x.png │ │ │ ├── icon_default_avatar@3x.png │ │ │ └── Contents.json │ │ └── icon_circle_open_comment.imageset │ │ │ ├── icon_circle_open_comment@2x.png │ │ │ ├── icon_circle_open_comment@3x.png │ │ │ └── Contents.json │ ├── .DS_Store │ ├── AppIcon.appiconset │ │ ├── icon-1024.png │ │ ├── icon-20@2x.png │ │ ├── icon-20@3x.png │ │ ├── icon-29@2x.png │ │ ├── icon-29@3x.png │ │ ├── icon-40@2x.png │ │ ├── icon-40@3x.png │ │ ├── icon-60@2x.png │ │ ├── icon-60@3x.png │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ ├── 启动页1242@1x.png │ │ ├── launchImage_1125@1x.png │ │ ├── launchImage_640@1x.png │ │ ├── launchImage_750@1x.png │ │ └── Contents.json ├── Dynamic │ ├── .DS_Store │ ├── View │ │ ├── .DS_Store │ │ ├── Other │ │ │ ├── HXCirclePraiseBtn.h │ │ │ ├── HXDynamicCircleMoreView.h │ │ │ ├── HXLabel.h │ │ │ ├── HXDynamicCircleImageView.h │ │ │ ├── HXDynamicCircleMoreView.m │ │ │ ├── HXCirclePraiseBtn.m │ │ │ ├── HXLabel.m │ │ │ └── HXDynamicCircleImageView.m │ │ ├── HXDynamicTableView.h │ │ ├── extension │ │ │ ├── HXNewExtensionLikedView.h │ │ │ ├── HXNewExtensionCommentCell.h │ │ │ ├── HXNewExtensionCommentView.h │ │ │ ├── HXNewExtensionLikedView.m │ │ │ ├── HXNewExtensionCommentCell.m │ │ │ └── HXNewExtensionCommentView.m │ │ ├── HXDynamicTableViewCell.h │ │ ├── HXDynamicTableView.m │ │ └── HXDynamicTableViewCell.m │ ├── Controller │ │ ├── HXDynamicController.h │ │ └── HXDynamicController.m │ └── Model │ │ └── HXDynamic.h ├── Other │ ├── emoji_imgs │ │ ├── im_ee_1@2x.png │ │ ├── im_ee_3@2x.png │ │ ├── im_ee_4@2x.png │ │ ├── im_ee_5@2x.png │ │ ├── im_ee_6@2x.png │ │ ├── im_ee_7@2x.png │ │ ├── im_ee_8@2x.png │ │ ├── im_ee_9@2x.png │ │ ├── im_ee_10@2x.png │ │ ├── im_ee_11@2x.png │ │ ├── im_ee_12@2x.png │ │ ├── im_ee_13@2x.png │ │ ├── im_ee_14@2x.png │ │ ├── im_ee_15@2x.png │ │ ├── im_ee_16@2x.png │ │ ├── im_ee_17@2x.png │ │ ├── im_ee_18@2x.png │ │ ├── im_ee_19@2x.png │ │ ├── im_ee_20@2x.png │ │ ├── im_ee_21@2x.png │ │ ├── im_ee_22@2x.png │ │ ├── im_ee_23@2x.png │ │ ├── im_ee_24@2x.png │ │ ├── im_ee_25@2x.png │ │ ├── im_ee_26@2x.png │ │ ├── im_ee_27@2x.png │ │ ├── im_ee_28@2x.png │ │ ├── im_ee_29@2x.png │ │ ├── im_ee_30@2x.png │ │ ├── im_ee_31@2x.png │ │ ├── im_ee_32@2x.png │ │ ├── im_ee_33@2x.png │ │ ├── im_ee_34@2x.png │ │ ├── im_ee_35@2x.png │ │ ├── im_ee_36@2x.png │ │ ├── im_ee_37@2x.png │ │ ├── im_ee_38@2x.png │ │ ├── im_ee_39@2x.png │ │ ├── im_ee_40@2x.png │ │ ├── im_ee_41@2x.png │ │ ├── im_ee_42@2x.png │ │ ├── im_ee_43@2x.png │ │ ├── im_ee_44@2x.png │ │ ├── im_ee_45@2x.png │ │ ├── im_ee_46@2x.png │ │ ├── im_ee_47@2x.png │ │ ├── im_ee_48@2x.png │ │ ├── im_ee_49@2x.png │ │ ├── im_ee_50@2x.png │ │ ├── im_ee_51@2x.png │ │ ├── im_ee_52@2x.png │ │ ├── im_ee_53@2x.png │ │ ├── im_ee_54@2x.png │ │ ├── im_ee_55@2x.png │ │ ├── im_ee_56@2x.png │ │ ├── im_ee_57@2x.png │ │ ├── im_ee_58@2x.png │ │ ├── im_ee_59@2x.png │ │ ├── im_ee_60@2x.png │ │ ├── im_ee_61@2x.png │ │ ├── im_ee_62@2x.png │ │ ├── im_ee_63@2x.png │ │ ├── im_ee_64@2x.png │ │ ├── im_ee_65@2x.png │ │ ├── im_ee_66@2x.png │ │ ├── im_ee_67@2x.png │ │ ├── im_ee_68@2x.png │ │ ├── im_ee_69@2x.png │ │ ├── im_ee_70@2x.png │ │ ├── im_ee_71@2x.png │ │ ├── im_ee_72@2x.png │ │ ├── im_ee_73@2x.png │ │ ├── im_ee_74@2x.png │ │ ├── im_ee_75@2x.png │ │ ├── im_ee_76@2x.png │ │ ├── im_ee_77@2x.png │ │ ├── im_ee_78@2x.png │ │ ├── im_ee_79@2x.png │ │ ├── im_ee_80@2x.png │ │ ├── im_ee_81@2x.png │ │ ├── im_ee_82@2x.png │ │ ├── im_ee_83@2x.png │ │ ├── im_ee_84@2x.png │ │ ├── im_ee_85@2x.png │ │ ├── im_ee_86@2x.png │ │ ├── im_ee_87@2x.png │ │ ├── im_ee_88@2x.png │ │ ├── im_ee_89@2x.png │ │ ├── im_ee_90@2x.png │ │ ├── im_piezui@2x.png │ │ └── emojiDataArr.plist │ ├── NSString+SimpleModifier.h │ ├── UIColor+hex.h │ ├── HXTool.h │ ├── HXTool.m │ ├── UIColor+hex.m │ ├── NSString+SimpleModifier.m │ └── RegexKitLite │ │ └── RegexKitLite.h ├── AppDelegate.h ├── main.m ├── Info.plist ├── PrefixHeader.pch └── AppDelegate.m ├── 1E7402830EB41B64DE4663DCCB008ACD.png ├── 87F34DD8E492A9CEE37B9194D87E9097.png ├── AB648C0CF0733AC9E31CBE22EA9F2B96.jpg ├── D05A26F7C43280BEA236757341832EDF.png ├── DynamicCircle.xcworkspace ├── xcuserdata │ └── zhangjiong.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── UserInterfaceState.xcuserstate ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── DynamicCircle.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── zhangjiong.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── zhangjiong.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Podfile ├── DynamicCircleTests ├── Info.plist └── DynamicCircleTests.m ├── DynamicCircleUITests ├── Info.plist └── DynamicCircleUITests.m └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/.DS_Store -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODFILE CHECKSUM: fe653b5790d1cbed687c36d77ce274929189fff0 2 | 3 | COCOAPODS: 1.5.0 4 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODFILE CHECKSUM: fe653b5790d1cbed687c36d77ce274929189fff0 2 | 3 | COCOAPODS: 1.5.0 4 | -------------------------------------------------------------------------------- /DynamicCircle/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/.DS_Store -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Dynamic/.DS_Store -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /1E7402830EB41B64DE4663DCCB008ACD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/1E7402830EB41B64DE4663DCCB008ACD.png -------------------------------------------------------------------------------- /87F34DD8E492A9CEE37B9194D87E9097.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/87F34DD8E492A9CEE37B9194D87E9097.png -------------------------------------------------------------------------------- /AB648C0CF0733AC9E31CBE22EA9F2B96.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/AB648C0CF0733AC9E31CBE22EA9F2B96.jpg -------------------------------------------------------------------------------- /D05A26F7C43280BEA236757341832EDF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/D05A26F7C43280BEA236757341832EDF.png -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Dynamic/View/.DS_Store -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_1@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_3@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_4@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_4@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_5@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_6@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_6@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_7@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_7@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_8@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_8@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_9@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_9@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/.DS_Store -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_10@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_10@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_11@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_11@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_12@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_12@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_13@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_13@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_14@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_14@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_15@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_15@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_16@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_17@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_17@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_18@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_18@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_19@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_19@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_20@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_21@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_21@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_22@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_22@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_23@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_23@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_24@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_24@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_25@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_25@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_26@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_26@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_27@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_27@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_28@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_28@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_29@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_30@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_30@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_31@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_31@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_32@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_33@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_33@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_34@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_34@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_35@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_35@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_36@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_36@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_37@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_37@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_38@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_38@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_39@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_39@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_40@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_41@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_41@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_42@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_42@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_43@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_43@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_44@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_44@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_45@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_45@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_46@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_46@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_47@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_47@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_48@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_48@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_49@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_49@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_50@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_51@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_51@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_52@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_52@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_53@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_53@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_54@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_54@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_55@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_55@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_56@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_56@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_57@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_58@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_58@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_59@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_59@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_60@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_61@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_61@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_62@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_62@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_63@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_63@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_64@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_64@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_65@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_65@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_66@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_66@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_67@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_67@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_68@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_68@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_69@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_69@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_70@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_70@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_71@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_71@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_72@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_73@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_73@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_74@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_74@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_75@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_75@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_76@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_77@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_77@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_78@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_78@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_79@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_79@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_80@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_80@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_81@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_81@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_82@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_82@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_83@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_83@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_84@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_84@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_85@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_85@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_86@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_86@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_87@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_87@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_88@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_88@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_89@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_89@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_ee_90@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_ee_90@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/im_piezui@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Other/emoji_imgs/im_piezui@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/LaunchImage.launchimage/启动页1242@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/LaunchImage.launchimage/启动页1242@1x.png -------------------------------------------------------------------------------- /DynamicCircle.xcworkspace/xcuserdata/zhangjiong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/LaunchImage.launchimage/launchImage_1125@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/LaunchImage.launchimage/launchImage_1125@1x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/LaunchImage.launchimage/launchImage_640@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/LaunchImage.launchimage/launchImage_640@1x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/LaunchImage.launchimage/launchImage_750@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/LaunchImage.launchimage/launchImage_750@1x.png -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DynamicCircle/Pods-DynamicCircle-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_DynamicCircle : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_DynamicCircle 5 | @end 6 | -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_like.imageset/icon_circle_like@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/icon_circle_like.imageset/icon_circle_like@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_like.imageset/icon_circle_like@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/icon_circle_like.imageset/icon_circle_like@3x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_open.imageset/icon_circle_open@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/icon_circle_open.imageset/icon_circle_open@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_open.imageset/icon_circle_open@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/icon_circle_open.imageset/icon_circle_open@3x.png -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DynamicCircle/Pods-DynamicCircle-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /DynamicCircle.xcworkspace/xcuserdata/zhangjiong.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle.xcworkspace/xcuserdata/zhangjiong.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/loading_commodity.imageset/loading_commodity@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/loading_commodity.imageset/loading_commodity@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/loading_commodity.imageset/loading_commodity@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/loading_commodity.imageset/loading_commodity@3x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_triangle.imageset/icon_circle_triangle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/icon_circle_triangle.imageset/icon_circle_triangle@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_triangle.imageset/icon_circle_triangle@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/icon_circle_triangle.imageset/icon_circle_triangle@3x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_default_avatar.imageset/icon_default_avatar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/icon_default_avatar.imageset/icon_default_avatar@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_default_avatar.imageset/icon_default_avatar@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/icon_default_avatar.imageset/icon_default_avatar@3x.png -------------------------------------------------------------------------------- /DynamicCircle.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_open_comment.imageset/icon_circle_open_comment@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/icon_circle_open_comment.imageset/icon_circle_open_comment@2x.png -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_open_comment.imageset/icon_circle_open_comment@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle/Assets.xcassets/Dynamic/icon_circle_open_comment.imageset/icon_circle_open_comment@3x.png -------------------------------------------------------------------------------- /DynamicCircle.xcodeproj/project.xcworkspace/xcuserdata/zhangjiong.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/HEAD/DynamicCircle.xcodeproj/project.xcworkspace/xcuserdata/zhangjiong.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /DynamicCircle.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DynamicCircle.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/Controller/HXDynamicController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXDynamicController.h 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HXDynamicController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/Other/HXCirclePraiseBtn.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXCirclePraiseBtn.h 3 | // HongXun 4 | // 5 | // Created by 赵阳 on 2018/3/28. 6 | // 7 | 8 | #import 9 | 10 | @interface HXCirclePraiseBtn : UIButton 11 | @property (nonatomic,copy) void(^explodeStopBlock)(void); 12 | -(void)animation; 13 | @end 14 | -------------------------------------------------------------------------------- /DynamicCircle.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/HXDynamicTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXDynamicTableView.h 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HXDynamicTableView : UITableView 12 | 13 | - (void)setupDatas:(NSMutableArray *)datas; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /DynamicCircle/Other/NSString+SimpleModifier.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+SimpleModifier.h 3 | // ManagementSystem 4 | // 5 | // Created by 俊欧巴 on 17/6/6. 6 | // Copyright © 2017年 俊欧巴. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (SimpleModifier) 12 | 13 | + (NSMutableDictionary *)retunTextDic; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /DynamicCircle/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DynamicCircle/Pods-DynamicCircle.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | OTHER_LDFLAGS = $(inherited) -ObjC 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 6 | PODS_ROOT = ${SRCROOT}/Pods 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DynamicCircle/Pods-DynamicCircle.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | OTHER_LDFLAGS = $(inherited) -ObjC 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 6 | PODS_ROOT = ${SRCROOT}/Pods 7 | -------------------------------------------------------------------------------- /DynamicCircle/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DynamicCircle.xcodeproj/xcuserdata/zhangjiong.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | DynamicCircle.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/extension/HXNewExtensionLikedView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXNewExtensionLikedView.h 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2018/1/17. 6 | // 7 | 8 | #import 9 | 10 | @interface HXNewExtensionLikedView : UIView 11 | 12 | @property (nonatomic, strong) NSAttributedString *praiseAttributed; 13 | 14 | @property (nonatomic, copy) void(^extensionLikedViewWithUserIdBlock)(NSString *text,NSString *type); 15 | 16 | @property (nonatomic, strong) UIView *bottonline; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_like.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_circle_like@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "icon_circle_like@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_open.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_circle_open@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "icon_circle_open@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/loading_commodity.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "loading_commodity@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "loading_commodity@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_triangle.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_circle_triangle@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "icon_circle_triangle@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_default_avatar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_default_avatar@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "icon_default_avatar@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/Dynamic/icon_circle_open_comment.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "icon_circle_open_comment@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "icon_circle_open_comment@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/zhangjiong.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-DynamicCircle.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 0 13 | 14 | 15 | SuppressBuildableAutocreation 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/Other/HXDynamicCircleMoreView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXDynamicCircleMoreView.h 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2017/12/18. 6 | // 7 | 8 | #import 9 | 10 | @interface HXDynamicCircleMoreView : UIView 11 | 12 | @property (nonatomic, copy) void (^dynamicCircleMoreViewWithBlocl)(NSInteger row); 13 | @property (nonatomic,copy) void(^priseExplodeStopCallBack)(void); 14 | 15 | - (void)showViewFrame:(CGPoint)point; 16 | 17 | - (void)backViewAction; 18 | 19 | - (void)likeSelected:(BOOL)selected; 20 | 21 | -(void)startAnimation; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/Other/HXLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXLabel.h 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2018/1/18. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @protocol HXLabelDelegate 12 | 13 | - (void)textWithAction:(NSString *)text toType:(NSString *)type; 14 | 15 | 16 | 17 | @end 18 | 19 | @interface HXLabel : UITextView 20 | 21 | @property (nonatomic, weak) id dataDelegate; 22 | @property (nonatomic, copy) NSString *type; 23 | 24 | @property (nonatomic, copy) void(^textEvenTochWithBlock)(void); 25 | @property (nonatomic, copy) void(^textLongPongPressGestureRecognizerTochWithBlock)(void); 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, ‘8.0’ 3 | 4 | target 'DynamicCircle' do 5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 6 | # use_frameworks! 7 | 8 | # Pods for DynamicCircle 9 | 10 | 11 | # 由于兼容的第三方比较多,下载代码后记得打开注释,pod install下 12 | 13 | # pod 'AFNetworking', '~> 3.1.0' 14 | # pod 'SDWebImage', '~> 4.0.0' 15 | # pod 'MJRefresh', '~> 3.1.15' 16 | # pod 'MJExtension', '~> 3.0.13' 17 | # pod 'SDAutoLayout', '~> 2.2.0' 18 | # pod 'JSONModel', '~> 1.7.0' 19 | # pod 'WCDB', '~> 1.0.6' 20 | # pod 'SVProgressHUD' 21 | # pod 'FLAnimatedImage', '~> 1.0.12' 22 | 23 | 24 | 25 | end 26 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/Other/HXDynamicCircleImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXDynamicCircleImageView.h 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2017/11/28. 6 | // 7 | 8 | #import 9 | 10 | @interface HXDynamicCircleImageView : UIView 11 | 12 | @property (nonatomic, copy) NSArray *spicpaths; 13 | @property (nonatomic, copy) NSArray *bpicpaths; 14 | @property (nonatomic, assign) CGFloat one_img_width; 15 | @property (nonatomic, assign) CGFloat one_img_height; 16 | 17 | @property (nonatomic, copy) void (^dynamicCircleImageViewWithBlock)(NSInteger row ,NSArray *images,NSArray *imageViews ,NSArray *urls, NSArray *frames); 18 | 19 | 20 | //@property (nonatomic, weak) id delegate; 21 | 22 | - (void)buttonClicked:(UITapGestureRecognizer *)tap; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /DynamicCircle/Other/UIColor+hex.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+hex.h 3 | // seafishing2 4 | // 5 | // Created by zhaoyk10 on 13-4-23. 6 | // Copyright (c) 2013年 Szfusion. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define RGB(R,G,B) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:1.0] 12 | #define RGBA(R,G,B,A) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A] 13 | 14 | @interface UIColor (hex) 15 | 16 | + (UIColor *)colorWithHex:(long)hexColor; 17 | + (UIColor *)colorWithHex:(long)hexColor alpha:(float)opacity; 18 | 19 | + (UIColor *)colorWithIntRed:(int)red green:(int)green blue:(int)blue alpha:(float)alpha; 20 | + (UIColor *)colorWithIntRed:(int)red green:(int)green blue:(int)blue; 21 | + (UIColor *)colorWithHexString: (NSString *)color; 22 | @end 23 | -------------------------------------------------------------------------------- /DynamicCircleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /DynamicCircleUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /DynamicCircle/Other/HXTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXTool.h 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HXTool : NSObject 12 | 13 | /** 14 | * text 高度 15 | */ 16 | + (CGFloat)calculateTextHeightWithWidth:(CGFloat)width andText:(NSString *)text andFont:(UIFont *)font; 17 | 18 | /** 19 | * text 高度 20 | * 21 | * attribute 22 | */ 23 | + (CGFloat)calculateTextHeightWithWidth:(CGFloat)width andText:(NSString *)text attributes:(NSDictionary *)attribute; 24 | 25 | /** 26 | * text 宽度 27 | */ 28 | + (CGFloat)calculateTextWidthWithText:(NSString *)text andFont:(UIFont *)font; 29 | 30 | /** 31 | * 复制到剪切板 32 | * 33 | */ 34 | + (void)generalPasteboard:(NSString *)location; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/extension/HXNewExtensionCommentCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXNewExtensionCommentCell.h 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2018/1/17. 6 | // 7 | 8 | #import 9 | #import "HXDynamic.h" 10 | 11 | @protocol HXNewExtensionCommentCellDelegate 12 | 13 | - (void)cellDidSelectWithText:(NSString *)text type:(NSString *)type; 14 | 15 | - (void)cellTextEvenTochWithModel:(HXNewDynamicCircleComment *)model; 16 | 17 | 18 | @end 19 | 20 | 21 | @interface HXNewExtensionCommentCell : UITableViewCell 22 | 23 | @property (nonatomic, strong) HXNewDynamicCircleComment *model; 24 | 25 | @property (nonatomic, weak) id delegate; 26 | 27 | @property (nonatomic, copy) void(^textWithBlock)(NSString *text,NSString *type); 28 | 29 | @property (nonatomic, copy) void(^textEvenTochWithBlock)(HXNewDynamicCircleComment *model); 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DynamicCircle/Pods-DynamicCircle-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/extension/HXNewExtensionCommentView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXNewExtensionCommentView.h 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2018/1/18. 6 | // 7 | 8 | #import 9 | #import "HXNewExtensionLikedView.h" 10 | 11 | @class HXDynamic; 12 | @class HXNewDynamicCircleComment; 13 | 14 | @protocol HXNewExtensionCommentViewDelegate 15 | 16 | - (void)newExtensionCommentViewtextWithAction:(NSString *)text toType:(NSString *)type; 17 | 18 | - (void)newExtensionCommentViewtextWithUserId:(NSString *)text; 19 | 20 | - (void)newExtensionCommentViewDidSelectRowAtModel:(HXNewDynamicCircleComment *)model; 21 | 22 | - (void)newExtensionCommentViewDidSelectRowAtView:(UIView *)view; 23 | 24 | @end 25 | 26 | @interface HXNewExtensionCommentView : UIView 27 | 28 | @property (nonatomic, strong) HXDynamic *model; 29 | 30 | @property (nonatomic, weak) HXNewExtensionLikedView *topView; 31 | 32 | @property (nonatomic, weak) id delegate; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /DynamicCircleTests/DynamicCircleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // DynamicCircleTests.m 3 | // DynamicCircleTests 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DynamicCircleTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation DynamicCircleTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DynamicCircle 2 | | dynamic circle of friends: (high custom 】 【 reason: because YYLabel wrote many methods are used to roll in the cell, setModel modified string data, add the click event, expression list & match special character data: the content of the cell when rolling in a lot of time will appear the phenomenon of caton, so the custom UITextView in dealing with data processing good attributedText expression, and special characters) 3 | 4 | When you download it, open the PodFile pod comment below pod install 5 | 6 | The project runs screenshot 1 7 | 8 | ![Screenshot of project run](https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/master/AB648C0CF0733AC9E31CBE22EA9F2B96.jpg) 9 | 10 | The project runs screenshot 2 11 | 12 | ![Screenshot of project run](https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/master/D05A26F7C43280BEA236757341832EDF.png) 13 | 14 | The project runs screenshot 3 15 | 16 | ![Screenshot of project run](https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/master/1E7402830EB41B64DE4663DCCB008ACD.png) 17 | 18 | The project runs screenshot 4 19 | 20 | ![Screenshot of project run](https://raw.githubusercontent.com/andZhangjiong/DynamicCircle/master/87F34DD8E492A9CEE37B9194D87E9097.png) 21 | 22 | 23 | -------------------------------------------------------------------------------- /DynamicCircleUITests/DynamicCircleUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // DynamicCircleUITests.m 3 | // DynamicCircleUITests 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DynamicCircleUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation DynamicCircleUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "2436h", 7 | "filename" : "launchImage_1125@1x.png", 8 | "minimum-system-version" : "11.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "736h", 16 | "filename" : "启动页1242@1x.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "portrait", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "667h", 25 | "filename" : "launchImage_750@1x.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "orientation" : "portrait", 32 | "idiom" : "iphone", 33 | "extent" : "full-screen", 34 | "minimum-system-version" : "7.0", 35 | "scale" : "2x" 36 | }, 37 | { 38 | "extent" : "full-screen", 39 | "idiom" : "iphone", 40 | "subtype" : "retina4", 41 | "filename" : "launchImage_640@1x.png", 42 | "minimum-system-version" : "7.0", 43 | "orientation" : "portrait", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /DynamicCircle/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon-40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "icon-60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "1024x1024", 53 | "idiom" : "ios-marketing", 54 | "filename" : "icon-1024.png", 55 | "scale" : "1x" 56 | } 57 | ], 58 | "info" : { 59 | "version" : 1, 60 | "author" : "xcode" 61 | } 62 | } -------------------------------------------------------------------------------- /DynamicCircle/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIRequiredDeviceCapabilities 24 | 25 | armv7 26 | 27 | UISupportedInterfaceOrientations 28 | 29 | UIInterfaceOrientationPortrait 30 | UIInterfaceOrientationLandscapeLeft 31 | UIInterfaceOrientationLandscapeRight 32 | 33 | UISupportedInterfaceOrientations~ipad 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationPortraitUpsideDown 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /DynamicCircle/PrefixHeader.pch: -------------------------------------------------------------------------------- 1 | // 2 | // PrefixHeader.pch 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #ifndef PrefixHeader_pch 10 | #define PrefixHeader_pch 11 | 12 | // Include any system framework and library headers here that should be included in all compilation units. 13 | // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file. 14 | 15 | #import 16 | #import 17 | #import 18 | 19 | #import "UIColor+hex.h" 20 | #import "HXTool.h" 21 | 22 | 23 | #pragma DEFINE 24 | 25 | #define HXWeakSelf(type) __weak typeof(type) weak##type = type; 26 | #define HXURL(urlString) [NSURL URLWithString:urlString] 27 | 28 | #pragma mark - # SIZE 29 | 30 | #define SIZE_SCREEN [UIScreen mainScreen].bounds.size 31 | #define WIDTH_SCREEN [UIScreen mainScreen].bounds.size.width 32 | #define HEIGHT_SCREEN [UIScreen mainScreen].bounds.size.height 33 | 34 | #pragma mark - # COLOR 35 | 36 | #define BORDERToWidth_4_Color [UIColor colorWithHex:0xcccccc] 37 | #define BORDERToWidth_8_Color [UIColor colorWithHex:0xf0f0f0] 38 | #define BORDERToWidth_Line_Color [UIColor colorWithHex:0xE5E5E5] 39 | #define BORDER_TextBlack_Color [UIColor colorWithHex:0x444444] 40 | #define BORDER_TextGrey1_Color [UIColor colorWithHex:0x8c8c8c] 41 | 42 | 43 | #pragma mark - # IPHONE 44 | 45 | #define iPhone5 WIDTH_SCREEN == 320 46 | 47 | #endif /* PrefixHeader_pch */ 48 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/HXDynamicTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXDynamicTableViewCell.h 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class HXDynamic; 12 | @class HXNewDynamicCircleComment; 13 | 14 | @protocol HXNewDynamicCircleCellDelegate 15 | 16 | // 按户型 17 | - (void)reloadViewWith:(NSIndexPath *)indexPath; 18 | 19 | - (void)dynamicCircleTouchBegan; 20 | 21 | - (void)dynamicCircleWithUserInfoUserid:(NSString *)userinfoid; 22 | 23 | - (void)dynamicCircleWebViewWithURL:(NSString *)url; 24 | 25 | - (void)dynamicCircleWebViewWithPhone:(NSString *)phone; 26 | 27 | - (void)dynamicCircleAddressWithLocation:(NSString *)location; 28 | 29 | 30 | - (void)dynamicCircleWithDeleteDynamicID:(NSString *)dynamicID ToTableViewCell:(UITableViewCell *)cell; 31 | 32 | 33 | - (void)dynamicCircleWithShowImageView:(NSInteger)row images:(NSArray *)images imageViews:(NSArray *)imageViews urls:(NSArray *)urls frames:(NSArray *)frames; 34 | 35 | 36 | - (void)dynamicCirclePraiseWithModel:(HXDynamic *)model ToTableViewCell:(UITableViewCell *)cell; 37 | 38 | 39 | - (void)dynamicCircleCommentWithModel:(HXDynamic *)model didWithcommModel:(HXNewDynamicCircleComment *)commModel toReplyuid:(NSString *)replyuid; 40 | 41 | //- (void)dynamicCircleCommentWithActionView:(UIView *)view; 42 | 43 | 44 | @end 45 | 46 | @interface HXDynamicTableViewCell : UITableViewCell 47 | 48 | @property (nonatomic, strong) HXDynamic *model; 49 | 50 | @property (nonatomic, weak) id delegate; 51 | 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /DynamicCircle/Other/HXTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // HXTool.m 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import "HXTool.h" 10 | 11 | @implementation HXTool 12 | 13 | //text 高度 14 | + (CGFloat)calculateTextHeightWithWidth:(CGFloat)width andText:(NSString *)text andFont:(UIFont *)font 15 | { 16 | NSDictionary *attribute = @{NSFontAttributeName: font}; 17 | CGRect rect = [text boundingRectWithSize:CGSizeMake(width, MAXFLOAT) options:NSStringDrawingTruncatesLastVisibleLine|NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin attributes:attribute context:nil]; 18 | return rect.size.height; 19 | } 20 | 21 | + (CGFloat)calculateTextHeightWithWidth:(CGFloat)width andText:(NSString *)text attributes:(NSDictionary *)attribute 22 | { 23 | CGRect rect = [text boundingRectWithSize:CGSizeMake(width, MAXFLOAT) options:NSStringDrawingTruncatesLastVisibleLine|NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin attributes:attribute context:nil]; 24 | return rect.size.height; 25 | } 26 | 27 | //text 宽度 28 | + (CGFloat)calculateTextWidthWithText:(NSString *)text andFont:(UIFont *)font 29 | { 30 | if (!text || !font) { 31 | return 0.0f; 32 | } 33 | NSDictionary *attribute = @{NSFontAttributeName: font}; 34 | CGRect rect = [text boundingRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) options:NSStringDrawingTruncatesLastVisibleLine|NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin attributes:attribute context:nil]; 35 | return rect.size.width + 2; 36 | } 37 | 38 | /** 39 | * 复制到剪切板 40 | * 41 | */ 42 | + (void)generalPasteboard:(NSString *)location 43 | { 44 | [UIPasteboard generalPasteboard].string = location; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/Controller/HXDynamicController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HXDynamicController.m 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import "HXDynamicController.h" 10 | 11 | #import "HXDynamicTableView.h" 12 | 13 | #import "HXDynamic.h" 14 | 15 | @interface HXDynamicController () 16 | 17 | @property (nonatomic, strong) HXDynamicTableView *tableView; 18 | 19 | @end 20 | 21 | @implementation HXDynamicController 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | // Do any additional setup after loading the view. 26 | 27 | [self setupView]; 28 | 29 | [self setupData]; 30 | } 31 | 32 | - (void)setupView 33 | { 34 | self.tableView.sd_layout 35 | .topSpaceToView(self.view, 0) 36 | .leftSpaceToView(self.view, 0) 37 | .rightSpaceToView(self.view, 0) 38 | .bottomSpaceToView(self.view, 0); 39 | } 40 | 41 | - (void)setupData 42 | { 43 | [self.tableView setupDatas:[HXDynamic getLocalData]]; 44 | } 45 | 46 | - (void)didReceiveMemoryWarning { 47 | [super didReceiveMemoryWarning]; 48 | // Dispose of any resources that can be recreated. 49 | } 50 | 51 | #pragma mark - Getter 52 | 53 | - (HXDynamicTableView *)tableView 54 | { 55 | if (!_tableView) { 56 | _tableView = [[HXDynamicTableView alloc] initWithFrame:(CGRectZero) style:(UITableViewStylePlain)]; 57 | [self.view addSubview:_tableView]; 58 | } 59 | return _tableView; 60 | } 61 | 62 | 63 | /* 64 | #pragma mark - Navigation 65 | 66 | // In a storyboard-based application, you will often want to do a little preparation before navigation 67 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 68 | // Get the new view controller using [segue destinationViewController]. 69 | // Pass the selected object to the new view controller. 70 | } 71 | */ 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/zhangjiong.xcuserdatad/xcschemes/Pods-DynamicCircle.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /DynamicCircle/Other/UIColor+hex.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+hex.m 3 | // seafishing2 4 | // 5 | // Created by zhaoyk10 on 13-4-23. 6 | // Copyright (c) 2013年 Szfusion. All rights reserved. 7 | // 8 | 9 | #import "UIColor+hex.h" 10 | 11 | @implementation UIColor (hex) 12 | 13 | + (UIColor*) colorWithHex:(long)hexColor { 14 | return [UIColor colorWithHex:hexColor alpha:1.0]; 15 | } 16 | 17 | + (UIColor *)colorWithHex:(long)hexColor alpha:(float)opacity { 18 | float red = ((float)((hexColor & 0xFF0000) >> 16))/255.0; 19 | float green = ((float)((hexColor & 0xFF00) >> 8))/255.0; 20 | float blue = ((float)(hexColor & 0xFF))/255.0; 21 | return [UIColor colorWithRed:red green:green blue:blue alpha:opacity]; 22 | } 23 | 24 | + (UIColor *)colorWithIntRed:(int)red green:(int)green blue:(int)blue alpha:(float)opacity { 25 | float _red = red / 255.0, _green = green / 255.0, _blue = blue / 255.0; 26 | return [UIColor colorWithRed:_red green:_green blue:_blue alpha:opacity]; 27 | } 28 | 29 | + (UIColor *)colorWithIntRed:(int)red green:(int)green blue:(int)blue { 30 | return [UIColor colorWithIntRed:red green:green blue:blue alpha:1.0]; 31 | } 32 | 33 | + (UIColor *)colorWithHexString: (NSString *)color { 34 | 35 | NSString *cString = [[color stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] uppercaseString]; 36 | 37 | // String should be 6 or 8 characters 38 | if ([cString length] < 6) { 39 | return [UIColor clearColor]; 40 | } 41 | 42 | // strip 0X if it appears 43 | if ([cString hasPrefix:@"0X"]) 44 | cString = [cString substringFromIndex:2]; 45 | if ([cString hasPrefix:@"#"]) 46 | cString = [cString substringFromIndex:1]; 47 | if ([cString length] != 6) 48 | return [UIColor clearColor]; 49 | 50 | // Separate into r, g, b substrings 51 | NSRange range; 52 | range.location = 0; 53 | range.length = 2; 54 | 55 | //r 56 | NSString *rString = [cString substringWithRange:range]; 57 | 58 | //g 59 | range.location = 2; 60 | NSString *gString = [cString substringWithRange:range]; 61 | 62 | //b 63 | range.location = 4; 64 | NSString *bString = [cString substringWithRange:range]; 65 | 66 | // Scan values 67 | unsigned int r, g, b; 68 | [[NSScanner scannerWithString:rString] scanHexInt:&r]; 69 | [[NSScanner scannerWithString:gString] scanHexInt:&g]; 70 | [[NSScanner scannerWithString:bString] scanHexInt:&b]; 71 | 72 | return [UIColor colorWithRed:((float) r / 255.0f) green:((float) g / 255.0f) blue:((float) b / 255.0f) alpha:1.0f]; 73 | } 74 | @end 75 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/extension/HXNewExtensionLikedView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HXNewExtensionLikedView.m 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2018/1/17. 6 | // 7 | 8 | #import "HXNewExtensionLikedView.h" 9 | #import "HXLabel.h" 10 | 11 | @interface HXNewExtensionLikedView () 12 | @property (nonatomic, strong) UIImageView *praiseImageView; 13 | @property (nonatomic, strong) HXLabel *praiseAttributedLabel; 14 | 15 | @end 16 | 17 | @implementation HXNewExtensionLikedView 18 | 19 | - (instancetype)init { 20 | if (self = [super init]) { 21 | 22 | self.praiseImageView.sd_layout 23 | .topSpaceToView(self, 9) 24 | .leftSpaceToView(self, 6.8) 25 | .widthIs(self.praiseImageView.image.size.width) 26 | .heightIs(self.praiseImageView.image.size.height); 27 | 28 | self.praiseAttributedLabel.sd_layout 29 | .topSpaceToView(self, 1.5) 30 | .leftSpaceToView(self.praiseImageView, 5.5) 31 | .rightSpaceToView(self, 0) 32 | .bottomSpaceToView(self, 0); 33 | 34 | UIView *bottonline = [[UILabel alloc] init]; 35 | bottonline.backgroundColor = BORDERToWidth_Line_Color; 36 | [self addSubview:bottonline]; 37 | _bottonline = bottonline; 38 | 39 | bottonline.sd_layout 40 | .bottomSpaceToView(self, 0.5) 41 | .leftSpaceToView(self, 0) 42 | .rightSpaceToView(self, 0) 43 | .heightIs(0.5); 44 | } 45 | return self; 46 | } 47 | 48 | - (void)setPraiseAttributed:(NSAttributedString *)praiseAttributed 49 | { 50 | _praiseAttributed = praiseAttributed; 51 | 52 | self.praiseAttributedLabel.attributedText = praiseAttributed; 53 | } 54 | 55 | - (void)textWithAction:(NSString *)text toType:(NSString *)type 56 | { 57 | if (_extensionLikedViewWithUserIdBlock) { 58 | _extensionLikedViewWithUserIdBlock(text,type); 59 | } 60 | } 61 | 62 | - (UIImageView *)praiseImageView 63 | { 64 | if (!_praiseImageView) { 65 | _praiseImageView = [[UIImageView alloc] init]; 66 | _praiseImageView.image = [UIImage imageNamed:@"icon_circle_like"]; 67 | [self addSubview:_praiseImageView]; 68 | } 69 | return _praiseImageView; 70 | } 71 | 72 | - (HXLabel *)praiseAttributedLabel 73 | { 74 | if (!_praiseAttributedLabel) { 75 | _praiseAttributedLabel = [[HXLabel alloc] init]; 76 | _praiseAttributedLabel.dataDelegate = self; 77 | _praiseAttributedLabel.backgroundColor = self.backgroundColor; 78 | 79 | [self addSubview:_praiseAttributedLabel]; 80 | } 81 | return _praiseAttributedLabel; 82 | } 83 | 84 | 85 | 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /DynamicCircle/Other/emoji_imgs/emojiDataArr.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | [微笑] 6 | [撇嘴] 7 | [色] 8 | [发呆] 9 | [得意] 10 | [流泪] 11 | [害羞] 12 | [闭嘴] 13 | [睡] 14 | [大哭] 15 | [尴尬] 16 | [发怒] 17 | [调皮] 18 | [龇牙] 19 | [惊讶] 20 | [难过] 21 | [酷] 22 | [冷汗] 23 | [抓狂] 24 | [吐] 25 | [偷笑] 26 | [可爱] 27 | [白眼] 28 | [傲慢] 29 | [饥饿] 30 | [困] 31 | [惊恐] 32 | [流汗] 33 | [憨笑] 34 | [大兵] 35 | [奋斗] 36 | [咒骂] 37 | [疑问] 38 | [嘘] 39 | [晕] 40 | [折磨] 41 | [衰] 42 | [骷髅] 43 | [敲打] 44 | [再见] 45 | [擦汗] 46 | [抠鼻] 47 | [鼓掌] 48 | [糗大了] 49 | [坏笑] 50 | [左哼哼] 51 | [右哼哼] 52 | [哈欠] 53 | [鄙视] 54 | [委屈] 55 | [快哭了] 56 | [阴险] 57 | [亲亲] 58 | [吓] 59 | [可怜] 60 | [菜刀] 61 | [西瓜] 62 | [啤酒] 63 | [篮球] 64 | [乒乓] 65 | [咖啡] 66 | [饭] 67 | [猪头] 68 | [玫瑰] 69 | [凋谢] 70 | [示爱] 71 | [爱心] 72 | [心碎] 73 | [蛋糕] 74 | [闪电] 75 | [炸弹] 76 | [刀] 77 | [足球] 78 | [瓢虫] 79 | [便便] 80 | [月亮] 81 | [太阳] 82 | [礼物] 83 | [拥抱] 84 | [强] 85 | [弱] 86 | [握手] 87 | [胜利] 88 | [抱拳] 89 | [勾引] 90 | [拳头] 91 | [差劲] 92 | [爱你] 93 | [NO] 94 | [OK] 95 | 96 | 97 | -------------------------------------------------------------------------------- /DynamicCircle/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import "HXDynamicController.h" 12 | 13 | @interface AppDelegate () 14 | 15 | @end 16 | 17 | @implementation AppDelegate 18 | 19 | 20 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 21 | // Override point for customization after application launch. 22 | 23 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 24 | self.window.backgroundColor = [UIColor whiteColor]; 25 | self.window.rootViewController = [[HXDynamicController alloc] init]; 26 | [self.window makeKeyAndVisible]; 27 | 28 | [self setSVProgressHUD]; 29 | 30 | return YES; 31 | } 32 | 33 | - (void)setSVProgressHUD 34 | { 35 | [SVProgressHUD setSuccessImage:nil]; 36 | [SVProgressHUD setErrorImage:nil]; 37 | 38 | // 1、SVProgressHUDMaskTypeNone 透明背景,且有穿透性(不影响交互) 39 | // 2、SVProgressHUDMaskTypeClear 透明背景,无穿透性(阻碍交互) 40 | // 3、SVProgressHUDMaskTypeBlack 透明黑色背景,无穿透性(阻碍交互) 41 | [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeNone]; 42 | 43 | // 1、SVProgressHUDStyleLight 白色hud,黑色文字,黑色转圈 44 | // 2、SVProgressHUDStyleDark 黑色hud,白色文字,白色转圈 45 | [SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark]; 46 | 47 | // 1、SVProgressHUDAnimationTypeNative:系统原生转圈; 48 | // 2、SVProgressHUDAnimationTypeFlat(环形转圈) 49 | [SVProgressHUD setDefaultAnimationType:SVProgressHUDAnimationTypeNative]; 50 | 51 | // 最小显示时长 52 | [SVProgressHUD setMinimumDismissTimeInterval:2]; 53 | // 最大显示时长 54 | [SVProgressHUD setMaximumDismissTimeInterval:3]; 55 | // 设置字体 56 | [SVProgressHUD setFont:[UIFont boldSystemFontOfSize:16]]; 57 | // 触觉反馈 58 | [SVProgressHUD setHapticsEnabled:YES]; 59 | } 60 | 61 | - (void)applicationWillResignActive:(UIApplication *)application { 62 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 63 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 64 | } 65 | 66 | 67 | - (void)applicationDidEnterBackground:(UIApplication *)application { 68 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 69 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 70 | } 71 | 72 | 73 | - (void)applicationWillEnterForeground:(UIApplication *)application { 74 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 75 | } 76 | 77 | 78 | - (void)applicationDidBecomeActive:(UIApplication *)application { 79 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 80 | } 81 | 82 | 83 | - (void)applicationWillTerminate:(UIApplication *)application { 84 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 85 | } 86 | 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/HXDynamicTableView.m: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // HXDynamicTableView.m 4 | // DynamicCircle 5 | // 6 | // Created by 张炯 on 2018/7/2. 7 | // Copyright © 2018年 张炯. All rights reserved. 8 | // 9 | 10 | #import "HXDynamicTableView.h" 11 | 12 | #import "HXDynamicTableViewCell.h" 13 | 14 | #import "HXDynamic.h" 15 | 16 | static NSString *kCellKey = @"HXDynamicTableViewCell"; 17 | 18 | @interface HXDynamicTableView ()< 19 | UITableViewDelegate, 20 | UITableViewDataSource, 21 | HXNewDynamicCircleCellDelegate 22 | > 23 | 24 | @property (nonatomic, strong) NSMutableArray *datas; 25 | 26 | @end 27 | 28 | @implementation HXDynamicTableView 29 | 30 | - (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style 31 | { 32 | if (self = [super initWithFrame:frame style:style]) { 33 | self.delegate = self; 34 | self.dataSource = self; 35 | self.backgroundColor = BORDERToWidth_8_Color; 36 | self.separatorStyle = UITableViewCellSeparatorStyleNone; 37 | self.estimatedRowHeight = 0; 38 | self.estimatedSectionFooterHeight = 0; 39 | self.estimatedSectionHeaderHeight = 0; 40 | [self registerClass:[HXDynamicTableViewCell class] forCellReuseIdentifier:kCellKey]; 41 | } 42 | return self; 43 | } 44 | 45 | - (void)setupDatas:(NSMutableArray *)datas 46 | { 47 | _datas = datas.mutableCopy; 48 | 49 | [self reloadData]; 50 | } 51 | 52 | #pragma mark - UITableViewDelegate & UITableViewDataSource 53 | 54 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 55 | { 56 | return self.datas.count; 57 | } 58 | 59 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 60 | { 61 | HXDynamicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellKey]; 62 | cell.model = self.datas[indexPath.row]; 63 | cell.delegate = self; 64 | return cell; 65 | } 66 | 67 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 68 | { 69 | HXDynamic *model = self.datas[indexPath.row]; 70 | return model.height; 71 | } 72 | 73 | #pragma mark - HXNewDynamicCircleCellDelegate 74 | 75 | - (void)reloadViewWith:(NSIndexPath *)indexPath 76 | { 77 | if (indexPath) { 78 | [self reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:(UITableViewRowAnimationNone)]; 79 | } 80 | else { 81 | [self reloadData]; 82 | } 83 | } 84 | 85 | - (void)dynamicCircleWebViewWithURL:(NSString *)url 86 | { 87 | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"这是一个url:%@", url]]; 88 | } 89 | 90 | - (void)dynamicCircleWebViewWithPhone:(NSString *)phone 91 | { 92 | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"这是一个phone:%@", phone]]; 93 | } 94 | 95 | - (void)dynamicCircleWithUserInfoUserid:(NSString *)userinfoid 96 | { 97 | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"点击了用户昵称或头像"]]; 98 | } 99 | 100 | - (void)dynamicCircleWithDeleteDynamicID:(NSString *)dynamicID ToTableViewCell:(UITableViewCell *)cell 101 | { 102 | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"点击了删除"]]; 103 | } 104 | 105 | - (void)dynamicCircleWithShowImageView:(NSInteger)row images:(NSArray *)images imageViews:(NSArray *)imageViews urls:(NSArray *)urls frames:(NSArray *)frames 106 | { 107 | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"点击了图片"]]; 108 | } 109 | 110 | 111 | - (void)dynamicCirclePraiseWithModel:(HXDynamic *)model ToTableViewCell:(UITableViewCell *)cell 112 | { 113 | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"点击了点赞"]]; 114 | } 115 | 116 | - (void)dynamicCircleCommentWithModel:(HXDynamic *)model didWithcommModel:(HXNewDynamicCircleComment *)commModel toReplyuid:(NSString *)replyuid 117 | { 118 | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"点击了评论"]]; 119 | } 120 | 121 | @end 122 | -------------------------------------------------------------------------------- /DynamicCircle/Other/NSString+SimpleModifier.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+SimpleModifier.m 3 | // ManagementSystem 4 | // 5 | // Created by 俊欧巴 on 17/6/6. 6 | // Copyright © 2017年 俊欧巴. All rights reserved. 7 | // 8 | 9 | #import "NSString+SimpleModifier.h" 10 | 11 | /* 12 | 13 | [囧] 14 | [愉快] 15 | [悠闲] 16 | 17 | [嘴唇] 18 | [跳跳][发抖][怄火][转圈] 19 | */ 20 | 21 | @implementation NSString (SimpleModifier) 22 | 23 | 24 | + (NSMutableDictionary *)retunTextDic 25 | { 26 | NSMutableDictionary *mapper = [NSMutableDictionary new]; 27 | mapper[@"[微笑]"] = @"im_ee_1"; 28 | mapper[@"[撇嘴]"] = @"im_piezui"; 29 | mapper[@"[色]"] = @"im_ee_3"; 30 | mapper[@"[发呆]"] = @"im_ee_4"; 31 | mapper[@"[得意]"] = @"im_ee_5"; 32 | mapper[@"[流泪]"] = @"im_ee_6"; 33 | mapper[@"[害羞]"] = @"im_ee_7"; 34 | mapper[@"[闭嘴]"] = @"im_ee_8"; 35 | mapper[@"[睡]"] = @"im_ee_9"; 36 | mapper[@"[大哭]"] = @"im_ee_10"; 37 | mapper[@"[尴尬]"] = @"im_ee_11"; 38 | mapper[@"[发怒]"] = @"im_ee_12"; 39 | mapper[@"[调皮]"] = @"im_ee_13"; 40 | mapper[@"[龇牙]"] = @"im_ee_14"; 41 | mapper[@"[惊讶]"] = @"im_ee_15"; 42 | mapper[@"[难过]"] = @"im_ee_16"; 43 | 44 | 45 | mapper[@"[酷]"] = @"im_ee_17"; 46 | mapper[@"[冷汗]"] = @"im_ee_18"; 47 | mapper[@"[抓狂]"] = @"im_ee_19"; 48 | mapper[@"[吐]"] = @"im_ee_20"; 49 | mapper[@"[偷笑]"] = @"im_ee_21"; 50 | mapper[@"[可爱]"] = @"im_ee_22"; 51 | mapper[@"[白眼]"] = @"im_ee_23"; 52 | mapper[@"[傲慢]"] = @"im_ee_24"; 53 | mapper[@"[饥饿]"] = @"im_ee_25"; 54 | mapper[@"[困]"] = @"im_ee_26"; 55 | mapper[@"[惊恐]"] = @"im_ee_27"; 56 | mapper[@"[流汗]"] = @"im_ee_28"; 57 | mapper[@"[憨笑]"] = @"im_ee_29"; 58 | mapper[@"[大兵]"] = @"im_ee_30"; 59 | mapper[@"[奋斗]"] = @"im_ee_31"; 60 | mapper[@"[咒骂]"] = @"im_ee_32"; 61 | mapper[@"[疑问]"] = @"im_ee_33"; 62 | mapper[@"[嘘]"] = @"im_ee_34"; 63 | mapper[@"[晕]"] = @"im_ee_35"; 64 | mapper[@"[折磨]"] = @"im_ee_36"; 65 | mapper[@"[衰]"] = @"im_ee_37"; 66 | mapper[@"[骷髅]"] = @"im_ee_38"; 67 | mapper[@"[敲打]"] = @"im_ee_39"; 68 | mapper[@"[再见]"] = @"im_ee_40"; 69 | mapper[@"[擦汗]"] = @"im_ee_41"; 70 | mapper[@"[抠鼻]"] = @"im_ee_42"; 71 | mapper[@"[鼓掌]"] = @"im_ee_43"; 72 | mapper[@"[糗大了]"] = @"im_ee_44"; 73 | mapper[@"[坏笑]"] = @"im_ee_45"; 74 | mapper[@"[左哼哼]"] = @"im_ee_46"; 75 | mapper[@"[右哼哼]"] = @"im_ee_47"; 76 | mapper[@"[哈欠]"] = @"im_ee_48"; 77 | mapper[@"[鄙视]"] = @"im_ee_49"; 78 | mapper[@"[委屈]"] = @"im_ee_50"; 79 | mapper[@"[快哭了]"] = @"im_ee_51"; 80 | mapper[@"[阴险]"] = @"im_ee_52"; 81 | mapper[@"[亲亲]"] = @"im_ee_53"; 82 | mapper[@"[吓]"] = @"im_ee_54"; 83 | mapper[@"[可怜]"] = @"im_ee_55"; 84 | mapper[@"[菜刀]"] = @"im_ee_56"; 85 | mapper[@"[西瓜]"] = @"im_ee_57"; 86 | mapper[@"[啤酒]"] = @"im_ee_58"; 87 | mapper[@"[篮球]"] = @"im_ee_59"; 88 | mapper[@"[乒乓]"] = @"im_ee_60"; 89 | mapper[@"[咖啡]"] = @"im_ee_61"; 90 | mapper[@"[饭]"] = @"im_ee_62"; 91 | mapper[@"[猪头]"] = @"im_ee_63"; 92 | mapper[@"[玫瑰]"] = @"im_ee_64"; 93 | mapper[@"[凋谢]"] = @"im_ee_65"; 94 | mapper[@"[示爱]"] = @"im_ee_66"; 95 | mapper[@"[爱心]"] = @"im_ee_67"; 96 | mapper[@"[心碎]"] = @"im_ee_68"; 97 | mapper[@"[蛋糕]"] = @"im_ee_69"; 98 | mapper[@"[闪电]"] = @"im_ee_70"; 99 | mapper[@"[炸弹]"] = @"im_ee_71"; 100 | mapper[@"[刀]"] = @"im_ee_72"; 101 | mapper[@"[足球]"] = @"im_ee_73"; 102 | mapper[@"[瓢虫]"] = @"im_ee_74"; 103 | mapper[@"[便便]"] = @"im_ee_75"; 104 | mapper[@"[月亮]"] = @"im_ee_76"; 105 | mapper[@"[太阳]"] =@"im_ee_77"; 106 | mapper[@"[礼物]"] = @"im_ee_78"; 107 | mapper[@"[拥抱]"] = @"im_ee_79"; 108 | mapper[@"[强]"] = @"im_ee_80"; 109 | mapper[@"[弱]"] = @"im_ee_81"; 110 | mapper[@"[握手]"] = @"im_ee_82"; 111 | mapper[@"[胜利]"] = @"im_ee_83"; 112 | mapper[@"[抱拳]"] = @"im_ee_84"; 113 | mapper[@"[勾引]"] = @"im_ee_85"; 114 | mapper[@"[拳头]"] = @"im_ee_86"; 115 | mapper[@"[差劲]"] = @"im_ee_87"; 116 | mapper[@"[爱你]"] = @"im_ee_88"; 117 | mapper[@"[NO]"] = @"im_ee_89"; 118 | mapper[@"[OK]"] = @"im_ee_90"; 119 | return mapper; 120 | } 121 | 122 | @end 123 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/Other/HXDynamicCircleMoreView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HXDynamicCircleMoreView.m 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2017/12/18. 6 | // 7 | 8 | #import "HXDynamicCircleMoreView.h" 9 | #import "HXCirclePraiseBtn.h" 10 | 11 | @interface HXDynamicCircleMoreView () 12 | 13 | @property (nonatomic, strong) UIView *moreView; 14 | 15 | @property (nonatomic, strong) HXCirclePraiseBtn *leftButton; 16 | @property (nonatomic, strong) UIButton *rightButton; 17 | 18 | @property (nonatomic,assign) CGPoint frpoint; 19 | 20 | @end 21 | 22 | 23 | 24 | @implementation HXDynamicCircleMoreView 25 | 26 | - (instancetype)init 27 | { 28 | if (self = [super init]) { 29 | [self setUpView]; 30 | } 31 | return self; 32 | } 33 | 34 | - (void)setUpView 35 | { 36 | UIView *backView = [[UIView alloc] init]; 37 | [self addSubview:backView]; 38 | 39 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backViewAction)]; 40 | [backView addGestureRecognizer:tap]; 41 | 42 | backView.sd_layout 43 | .topSpaceToView(self, 0) 44 | .leftSpaceToView(self, 0) 45 | .rightSpaceToView(self, 0) 46 | .bottomSpaceToView(self, 0); 47 | 48 | UIView *moreView = [[UIView alloc] init]; 49 | moreView.backgroundColor = [UIColor colorWithHex:0x4d5153]; 50 | moreView.layer.cornerRadius = 5; 51 | moreView.layer.masksToBounds = YES; 52 | [self addSubview:moreView]; 53 | _moreView = moreView; 54 | 55 | HXCirclePraiseBtn *leftButton = [HXCirclePraiseBtn buttonWithType:(UIButtonTypeCustom)]; 56 | __weak typeof(self) weakself = self; 57 | leftButton.explodeStopBlock = ^{ 58 | if (weakself.priseExplodeStopCallBack) { 59 | weakself.priseExplodeStopCallBack(); 60 | } 61 | }; 62 | [leftButton setImage:[UIImage imageNamed:@"icon_circle_open_like"] forState:UIControlStateNormal]; 63 | [leftButton setTitle:@" 赞" forState:(UIControlStateNormal)]; 64 | [leftButton setTitle:@" 取消" forState:(UIControlStateSelected)]; 65 | leftButton.titleLabel.font = [UIFont systemFontOfSize:13]; 66 | [moreView addSubview:leftButton]; 67 | leftButton.frame = CGRectMake(0, 0, 64, 40); 68 | _leftButton = leftButton; 69 | 70 | [leftButton addTarget:self action:@selector(leftButtonWithAction:) forControlEvents:(UIControlEventTouchUpInside)]; 71 | 72 | UIButton *rightButton = [UIButton buttonWithType:(UIButtonTypeCustom)]; 73 | [rightButton setImage:[UIImage imageNamed:@"icon_circle_open_comment"] forState:(UIControlStateNormal)]; 74 | rightButton.titleLabel.font = [UIFont systemFontOfSize:13]; 75 | [rightButton setTitle:@" 评论" forState:(UIControlStateNormal)]; 76 | [moreView addSubview:rightButton]; 77 | rightButton.frame = CGRectMake(65, 0, 64, 40); 78 | _rightButton = rightButton; 79 | 80 | [rightButton addTarget:self action:@selector(rightButtonWithAction:) forControlEvents:(UIControlEventTouchUpInside)]; 81 | 82 | UIView *cenLen = [[UIView alloc] init]; 83 | cenLen.backgroundColor = BORDER_TextBlack_Color; 84 | cenLen.frame = CGRectMake(60, 8, 1, 40-16); 85 | [moreView addSubview:cenLen]; 86 | } 87 | 88 | -(void)startAnimation{ 89 | [_leftButton animation]; 90 | } 91 | 92 | - (void)likeSelected:(BOOL)selected 93 | { 94 | _leftButton.selected = selected; 95 | } 96 | 97 | - (void)leftButtonWithAction:(UIButton *)sender 98 | { 99 | sender.selected = !sender.selected; 100 | 101 | if (_dynamicCircleMoreViewWithBlocl) { 102 | _dynamicCircleMoreViewWithBlocl(1); 103 | } 104 | 105 | } 106 | 107 | - (void)rightButtonWithAction:(UIButton *)sender 108 | { 109 | if (_dynamicCircleMoreViewWithBlocl) { 110 | _dynamicCircleMoreViewWithBlocl(2); 111 | } 112 | } 113 | 114 | - (void)showViewFrame:(CGPoint)point 115 | { 116 | _frpoint = point; 117 | 118 | CGFloat WIDTH = 130; 119 | 120 | _moreView.frame = CGRectMake(point.x, point.y-5, 0, 40); 121 | 122 | [UIView animateWithDuration:0.2 animations:^{ 123 | self.moreView.frame = CGRectMake(point.x-WIDTH, point.y-5, WIDTH, 40); 124 | } completion:^(BOOL finished) { 125 | 126 | }]; 127 | } 128 | 129 | - (void)backViewAction 130 | { 131 | [UIView animateWithDuration:0.2 animations:^{ 132 | self.moreView.frame = CGRectMake(_frpoint.x, _frpoint.y-5, 0, 40); 133 | } completion:^(BOOL finished) { 134 | [self removeFromSuperview]; 135 | }]; 136 | } 137 | 138 | @end 139 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/extension/HXNewExtensionCommentCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // HXNewExtensionCommentCell.m 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2018/1/17. 6 | // 7 | 8 | #import "HXNewExtensionCommentCell.h" 9 | #import "HXLabel.h" 10 | 11 | @interface HXNewExtensionCommentCell () 12 | 13 | @property (nonatomic, strong) HXLabel *commtentAttributedLabel; 14 | 15 | @end 16 | 17 | @implementation HXNewExtensionCommentCell 18 | 19 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 20 | { 21 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { 22 | 23 | self.commtentAttributedLabel.sd_layout 24 | .topSpaceToView(self, 1) 25 | .leftSpaceToView(self, 5) 26 | .rightSpaceToView(self, 0) 27 | .bottomSpaceToView(self, 0); 28 | self.backgroundColor = BORDERToWidth_8_Color; 29 | } 30 | return self; 31 | } 32 | 33 | - (void)WillHideMenu:(id)sender 34 | { 35 | self.backgroundColor = BORDERToWidth_8_Color; 36 | [[NSNotificationCenter defaultCenter] removeObserver:self name:UIMenuControllerWillHideMenuNotification object:nil]; 37 | } 38 | 39 | - (void)copy:(UIMenuController *)menu 40 | { 41 | 42 | [SVProgressHUD showErrorWithStatus: @"已复制到剪切板"]; 43 | 44 | self.backgroundColor = BORDERToWidth_8_Color; 45 | [[NSNotificationCenter defaultCenter] removeObserver:self name:UIMenuControllerWillHideMenuNotification object:nil]; 46 | 47 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 48 | [HXTool generalPasteboard:self.model.content]; 49 | }); 50 | } 51 | 52 | //必须要有,如果要UIMenuController显示 53 | - (BOOL)canBecomeFirstResponder 54 | { 55 | return true; 56 | } 57 | 58 | //监听自己的定义事件,是 return YES; 否 return NO 即移除系统; 59 | - (BOOL)canPerformAction:(SEL)action withSender:(id)sender 60 | { 61 | if (action == @selector(copy:)) { 62 | return YES; 63 | } 64 | return NO; 65 | } 66 | 67 | 68 | - (void)setModel:(HXNewDynamicCircleComment *)model 69 | { 70 | _model = model; 71 | self.commtentAttributedLabel.attributedText = model.commtentAttributedString; 72 | } 73 | 74 | - (void)textWithAction:(NSString *)text toType:(NSString *)type 75 | { 76 | if (_textWithBlock) { 77 | _textWithBlock(text,type); 78 | } 79 | 80 | if (self.delegate && [self.delegate respondsToSelector:@selector(cellDidSelectWithText:type:)]) { 81 | [self.delegate cellDidSelectWithText:text type:type]; 82 | } 83 | } 84 | 85 | - (void)setTextEvenToch 86 | { 87 | if (_textEvenTochWithBlock) { 88 | _textEvenTochWithBlock(_model); 89 | } 90 | 91 | if (self.delegate && [self.delegate respondsToSelector:@selector(cellTextEvenTochWithModel:)]) { 92 | [self.delegate cellTextEvenTochWithModel:_model]; 93 | } 94 | } 95 | 96 | - (void)longPressAction:(UILongPressGestureRecognizer *)tap 97 | { 98 | [self becomeFirstResponder]; 99 | 100 | UIMenuController *menu = [UIMenuController sharedMenuController]; 101 | 102 | if (menu.isMenuVisible) { 103 | return; 104 | } 105 | 106 | CGRect frame = self.commtentAttributedLabel.bounds; 107 | frame.size.width = frame.size.width/2; 108 | 109 | [menu setTargetRect:frame inView:self.commtentAttributedLabel]; 110 | 111 | [menu setMenuVisible:YES animated:YES]; 112 | 113 | [[NSNotificationCenter defaultCenter] addObserver:self 114 | selector:@selector(WillHideMenu:) 115 | name:UIMenuControllerWillHideMenuNotification 116 | object:nil]; 117 | 118 | self.backgroundColor = BORDERToWidth_4_Color; 119 | } 120 | 121 | - (HXLabel *)commtentAttributedLabel 122 | { 123 | if (!_commtentAttributedLabel) { 124 | _commtentAttributedLabel = [[HXLabel alloc] init]; 125 | _commtentAttributedLabel.dataDelegate = self; 126 | _commtentAttributedLabel.type = @"comment"; 127 | _commtentAttributedLabel.backgroundColor = self.backgroundColor; 128 | 129 | [self addSubview:_commtentAttributedLabel]; 130 | 131 | HXWeakSelf(self); 132 | [_commtentAttributedLabel setTextEvenTochWithBlock:^{ 133 | [weakself setTextEvenToch]; 134 | }]; 135 | 136 | UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressAction:)]; 137 | [_commtentAttributedLabel addGestureRecognizer:longPress]; 138 | } 139 | return _commtentAttributedLabel; 140 | } 141 | 142 | 143 | @end 144 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/Model/HXDynamic.h: -------------------------------------------------------------------------------- 1 | // 2 | // HXDynamic.h 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define kRegulaURLStr @"((http[s]{0,1}|ftp)://[a-zA-Z0-9\\.\\-]+\\.([a-zA-Z]{2,4})(:\\d+)?(/[a-zA-Z0-9\\.\\-~!@#$%^&*+?:_/=<>]*)?)|(www.[a-zA-Z0-9\\.\\-]+\\.([a-zA-Z]{2,4})(:\\d+)?(/[a-zA-Z0-9\\.\\-~!@#$%^&*+?:_/=<>]*)?)|(m.[a-zA-Z0-9\\.\\-]+\\.([a-zA-Z]{2,4})(:\\d+)?(/[a-zA-Z0-9\\.\\-~!@#$%^&*+?:_/=<>]*)?)|(((http[s]{0,1}|ftp)://|)((?:(?:25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d)))\\.){3}(?:25[0-5]|2[0-4]\\d|((1\\d{2})|([1-9]?\\d))))(:\\d+)?(/[a-zA-Z0-9\\.\\-~!@#$%^&*+?:_/=<>]*)?)" 12 | 13 | #define kRegulaPhoneStr @"[0-9][0-9]{4,}" 14 | 15 | @interface HXDynamic : NSObject 16 | 17 | @property (nonatomic, copy) NSString *ID; 18 | @property (nonatomic, copy) NSString *userinfoid; 19 | @property (nonatomic, copy) NSString *nickname; 20 | @property (nonatomic, copy) NSString *photoUrl; 21 | @property (nonatomic, copy) NSString *grade; 22 | @property (nonatomic, copy) NSString *sex; 23 | @property (nonatomic, copy) NSString *pubdate; 24 | @property (nonatomic, copy) NSString *imginfo; 25 | @property (nonatomic, copy) NSString *content; 26 | @property (nonatomic, copy) NSString *praisestatus; 27 | @property (nonatomic, copy) NSString *praisestr; 28 | @property (nonatomic, copy) NSString *location; 29 | 30 | @property (nonatomic, copy) NSArray *spicpath; 31 | @property (nonatomic, copy) NSArray *bpicpath; 32 | @property (nonatomic, copy) NSArray *praiselist; 33 | @property (nonatomic, copy) NSArray *webChatCommentInfoList; 34 | @property (nonatomic, copy) NSMutableArray *commentModels; 35 | 36 | @property (nonatomic, strong) NSMutableAttributedString *attributedText; 37 | @property (nonatomic, strong) NSAttributedString *praiseAttributed; 38 | 39 | @property (nonatomic, assign) CGFloat height; 40 | 41 | @property (nonatomic, assign) CGFloat nicknameW; 42 | @property (nonatomic, assign) CGFloat allcontentButtonH; 43 | @property (nonatomic, assign) CGFloat addressW; 44 | @property (nonatomic, assign) CGFloat addressH; 45 | @property (nonatomic, assign) CGFloat timeW; 46 | @property (nonatomic, assign) CGFloat timeH; 47 | @property (nonatomic, assign) CGFloat width_img; 48 | @property (nonatomic, assign) CGFloat height_img; 49 | @property (nonatomic, assign) CGFloat spicpathHeight; 50 | @property (nonatomic, assign) CGFloat praiseetrHeight; 51 | 52 | @property (nonatomic, assign) CGFloat commtentTopViewH; 53 | @property (nonatomic, assign) CGFloat commtentViewH; 54 | 55 | @property (nonatomic, assign) CGFloat maxWidth; 56 | @property (nonatomic, assign) CGSize contentSize; 57 | 58 | @property (nonatomic, assign) BOOL isShowAllButton; 59 | @property (nonatomic, assign) BOOL isShowAllAttributedText;//是否全部显示 60 | 61 | @property (nonatomic, copy) NSDictionary *retunTextDic; 62 | 63 | + (NSMutableArray *)getLocalData; 64 | 65 | - (void)setattributedTextWithHeight:(CGFloat)isShowAllAttributedText; 66 | 67 | 68 | @end 69 | 70 | @interface ZLTextPart : NSObject 71 | 72 | /** 这段文字的内容 */ 73 | @property (nonatomic, copy) NSString *text; 74 | /** 这段文字的范围 */ 75 | @property (nonatomic, assign) NSRange range; 76 | /** 是否为特殊文字 */ 77 | @property (nonatomic, assign, getter = isSpecical) BOOL special; 78 | /** 是否为表情 */ 79 | @property (nonatomic, assign, getter = isEmotion) BOOL emotion; 80 | @property (nonatomic, assign, getter = isName) BOOL name; 81 | 82 | @end 83 | 84 | @interface ZLSpecial : NSObject 85 | /** 这段特殊文字的内容 */ 86 | @property (nonatomic, copy) NSString *text; 87 | /** 这段特殊文字的范围 */ 88 | @property (nonatomic, assign) NSRange range; 89 | @property(nonatomic,copy)NSString *urlString; 90 | @property(nonatomic,copy)NSString *type; 91 | 92 | @end 93 | 94 | @interface HXNewDynamicCircleComment : NSObject 95 | 96 | @property (nonatomic, assign) NSInteger index; 97 | // 动态者id 名称 98 | @property (nonatomic, copy) NSString *myuserid; 99 | @property (nonatomic, copy) NSString *mynikename; 100 | @property (nonatomic, copy) NSDictionary *retunTextDic; 101 | 102 | @property (nonatomic, strong) NSMutableAttributedString *commtentAttributedString; 103 | 104 | @property (nonatomic, copy) NSString *ID; 105 | @property (nonatomic, copy) NSString *content; 106 | @property (nonatomic, copy) NSString *allcontent; 107 | 108 | @property (nonatomic, copy) NSString *createtime; 109 | @property (nonatomic, copy) NSString *time; 110 | @property (nonatomic, copy) NSString *pubdate; 111 | 112 | @property (nonatomic, copy) NSString *replynickname; 113 | @property (nonatomic, copy) NSString *replyuid; 114 | @property (nonatomic, copy) NSString *webchatid; 115 | 116 | @property (nonatomic, copy) NSString *sex; 117 | @property (nonatomic, copy) NSString *sexImageName; 118 | @property (nonatomic, copy) NSString *userinfoid; 119 | @property (nonatomic, copy) NSString *username; 120 | @property (nonatomic, copy) NSString *nickname; 121 | @property (nonatomic, copy) NSString *photo; 122 | @property (nonatomic, copy) NSString *grade; 123 | 124 | 125 | @property (nonatomic, assign) CGFloat height; 126 | 127 | - (void)setUpCommtentFrame; 128 | 129 | 130 | 131 | @end 132 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/Other/HXCirclePraiseBtn.m: -------------------------------------------------------------------------------- 1 | // 2 | // HXCirclePraiseBtn.m 3 | // HongXun 4 | // 5 | // Created by 赵阳 on 2018/3/28. 6 | // 7 | 8 | #import "HXCirclePraiseBtn.h" 9 | @interface HXCirclePraiseBtn() 10 | //两种不同的CAEmitterLayer 11 | @property (strong, nonatomic) CAEmitterLayer *chargeLayer; 12 | @property (strong, nonatomic) CAEmitterLayer *explosionLayer; 13 | @end 14 | 15 | @implementation HXCirclePraiseBtn 16 | -(instancetype)initWithFrame:(CGRect)frame{ 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | // [self setup]; 20 | } 21 | return self; 22 | } 23 | 24 | 25 | /** 26 | * 配置WclEmitterButton 27 | */ 28 | - (void)setup { 29 | //参数详情请见博客详解:http://blog.csdn.net/wang631106979/article/details/51258020 30 | CAEmitterCell *explosionCell = [CAEmitterCell emitterCell]; 31 | explosionCell.name = @"explosion"; 32 | explosionCell.alphaRange = 0.10; 33 | explosionCell.alphaSpeed = -1.0; 34 | explosionCell.lifetime = 0.7; 35 | explosionCell.lifetimeRange = 0.3; 36 | explosionCell.birthRate = 0; 37 | explosionCell.velocity = 40.00; 38 | explosionCell.velocityRange = 10.00; 39 | explosionCell.scale = 0.03; 40 | explosionCell.scaleRange = 0.02; 41 | explosionCell.contents = (id)[UIImage imageNamed:@"Sparkle"].CGImage; 42 | 43 | _explosionLayer = [CAEmitterLayer layer]; 44 | _explosionLayer.name = @"emitterLayer"; 45 | _explosionLayer.emitterShape = kCAEmitterLayerCircle; 46 | _explosionLayer.emitterMode = kCAEmitterLayerOutline; 47 | _explosionLayer.emitterSize = CGSizeMake(10, 0); 48 | _explosionLayer.emitterCells = @[explosionCell]; 49 | _explosionLayer.renderMode = kCAEmitterLayerOldestFirst; 50 | _explosionLayer.masksToBounds = NO; 51 | _explosionLayer.position = CGPointMake(self.frame.size.width/2.0, self.frame.size.height/2.0); 52 | _explosionLayer.zPosition = -1; 53 | [self.layer addSublayer:_explosionLayer]; 54 | 55 | CAEmitterCell *chargeCell = [CAEmitterCell emitterCell]; 56 | chargeCell.name = @"charge"; 57 | chargeCell.alphaRange = 0.10; 58 | chargeCell.alphaSpeed = -1.0; 59 | chargeCell.lifetime = 0.3; 60 | chargeCell.lifetimeRange = 0.1; 61 | chargeCell.birthRate = 0; 62 | chargeCell.velocity = -40.0; 63 | chargeCell.velocityRange = 0.00; 64 | chargeCell.scale = 0.03; 65 | chargeCell.scaleRange = 0.02; 66 | chargeCell.contents = (id)[UIImage imageNamed:@"Sparkle"].CGImage; 67 | 68 | _chargeLayer = [CAEmitterLayer layer]; 69 | _chargeLayer.name = @"emitterLayer"; 70 | _chargeLayer.emitterShape = kCAEmitterLayerCircle; 71 | _chargeLayer.emitterMode = kCAEmitterLayerOutline; 72 | _chargeLayer.emitterSize = CGSizeMake(20, 0); 73 | _chargeLayer.emitterCells = @[chargeCell]; 74 | _chargeLayer.renderMode = kCAEmitterLayerOldestFirst; 75 | _chargeLayer.masksToBounds = NO; 76 | _chargeLayer.position = CGPointMake(self.frame.size.width/2.0, self.frame.size.height/2.0); 77 | _chargeLayer.zPosition = -1; 78 | [self.layer addSublayer:_chargeLayer]; 79 | } 80 | 81 | /** 82 | * 开始动画 83 | */ 84 | 85 | - (void)animation { 86 | CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"transform.scale"]; 87 | if (self.selected) { 88 | animation.values = @[@1.5 ,@0.8, @1.0,@1.2,@1.0]; 89 | animation.duration = 0.5; 90 | // [self startAnimate]; 91 | }else 92 | { 93 | animation.values = @[@0.8, @1.0]; 94 | animation.duration = 0.2; 95 | } 96 | animation.calculationMode = kCAAnimationCubic; 97 | [self.layer addAnimation:animation forKey:@"transform.scale"]; 98 | 99 | [self performSelector:@selector(animationgStop) withObject:nil afterDelay:animation.duration]; 100 | 101 | } 102 | 103 | -(void)animationgStop{ 104 | if (self.explodeStopBlock) { 105 | self.explodeStopBlock(); 106 | } 107 | } 108 | 109 | /** 110 | * 开始喷射 111 | */ 112 | - (void)startAnimate { 113 | //chareLayer开始时间 114 | self.chargeLayer.beginTime = CACurrentMediaTime(); 115 | //chareLayer每秒喷射的80个 116 | [self.chargeLayer setValue:@80 forKeyPath:@"emitterCells.charge.birthRate"]; 117 | //进入下一个动作 118 | [self performSelector:@selector(explode) withObject:nil afterDelay:0.2]; 119 | } 120 | 121 | /** 122 | * 大量喷射 123 | */ 124 | - (void)explode { 125 | //让chareLayer每秒喷射的个数为0个 126 | [self.chargeLayer setValue:@0 forKeyPath:@"emitterCells.charge.birthRate"]; 127 | //explosionLayer开始时间 128 | self.explosionLayer.beginTime = CACurrentMediaTime(); 129 | //explosionLayer每秒喷射的2500个 130 | [self.explosionLayer setValue:@2500 forKeyPath:@"emitterCells.explosion.birthRate"]; 131 | //停止喷射 132 | [self performSelector:@selector(stop) withObject:nil afterDelay:0.1]; 133 | } 134 | 135 | /** 136 | * 停止喷射 137 | */ 138 | - (void)stop { 139 | //让chareLayer每秒喷射的个数为0个 140 | [self.chargeLayer setValue:@0 forKeyPath:@"emitterCells.charge.birthRate"]; 141 | //explosionLayer每秒喷射的0个 142 | [self.explosionLayer setValue:@0 forKeyPath:@"emitterCells.explosion.birthRate"]; 143 | if (self.explodeStopBlock) { 144 | self.explodeStopBlock(); 145 | } 146 | } 147 | 148 | @end 149 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DynamicCircle/Pods-DynamicCircle-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_BUILD_DIR}/assetcatalog_generated_info.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-DynamicCircle/Pods-DynamicCircle-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 145 | wait 146 | fi 147 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/Other/HXLabel.m: -------------------------------------------------------------------------------- 1 | // 2 | // HXLabel.m 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2018/1/18. 6 | // 7 | 8 | 9 | 10 | #import "HXLabel.h" 11 | 12 | #define ZLStatusTextViewCoverTag 999 13 | #define ZLLongPongPressGestureRecognizerTag 222 14 | 15 | #import "HXDynamic.h" 16 | 17 | @interface HXLabel () 18 | 19 | @property (nonatomic, assign) BOOL isLongPongPressGestureRecognizer; 20 | 21 | @end 22 | 23 | @implementation HXLabel 24 | 25 | - (id)initWithFrame:(CGRect)frame 26 | { 27 | if (self = [super initWithFrame:frame]) { 28 | self.backgroundColor = [UIColor clearColor]; 29 | self.editable = NO; 30 | self.scrollEnabled = NO; 31 | 32 | if (iPhone5) { 33 | } 34 | else { 35 | self.selectable = NO; 36 | } 37 | } 38 | return self; 39 | } 40 | 41 | - (void)setAttributedText:(NSAttributedString *)attributedText 42 | { 43 | [super setAttributedText:attributedText]; 44 | 45 | if (_type) { 46 | self.textContainerInset = UIEdgeInsetsMake(0, -5, 0, -5); 47 | } 48 | else { 49 | self.textContainerInset = UIEdgeInsetsMake(5, -5, -5, -5); 50 | } 51 | } 52 | 53 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 54 | { 55 | // 触摸对象 56 | UITouch *touch = [touches anyObject]; 57 | 58 | // 触摸点 59 | CGPoint point = [touch locationInView:self]; 60 | 61 | NSMutableArray *specials = [[self.attributedText attribute:@"specials" atIndex:0 effectiveRange:NULL] mutableCopy]; 62 | BOOL contains = NO; 63 | 64 | NSString *type; 65 | for (ZLSpecial *special in specials) { 66 | if (!type) { 67 | type = special.type; 68 | } 69 | self.selectedRange = special.range; 70 | 71 | // [self setNewSelectedRange:special.range]; 72 | // NSRange range = [self getSelectedRange]; 73 | 74 | 75 | // self.selectedRange --影响--> self.selectedTextRange 76 | // 获得选中范围的矩形框 77 | NSArray *rects = [self selectionRectsForRange:self.selectedTextRange]; 78 | // 清空选中范围 79 | self.selectedRange = NSMakeRange(0, 0); 80 | 81 | for (UITextSelectionRect *selectionRect in rects) { 82 | CGRect rect = selectionRect.rect; 83 | if (rect.size.width == 0 || rect.size.height == 0) continue; 84 | 85 | if (CGRectContainsPoint(rect, point)) { // 点中了某个特殊字符串 86 | contains = YES; 87 | break; 88 | } 89 | } 90 | 91 | if (contains) { 92 | for (UITextSelectionRect *selectionRect in rects) { 93 | CGRect rect = selectionRect.rect; 94 | if (rect.size.width == 0 || rect.size.height == 0) continue; 95 | 96 | rect.origin.x = rect.origin.x-8; 97 | if (_type) { 98 | rect.origin.y = rect.origin.y-6.5; 99 | } 100 | else { 101 | rect.origin.y = rect.origin.y-3; 102 | } 103 | rect.size.width = rect.size.width + 5; 104 | 105 | NSMutableAttributedString *textColor = self.attributedText.mutableCopy; 106 | [textColor addAttribute:NSBackgroundColorAttributeName value:BORDERToWidth_4_Color range:special.range]; 107 | [self setAttributedText:textColor]; 108 | } 109 | 110 | break; 111 | } 112 | } 113 | 114 | if (!contains) { 115 | [super touchesBegan:touches withEvent:event]; 116 | 117 | if ([type isEqualToString:@"name"]) { 118 | NSMutableAttributedString *textColor = self.attributedText.mutableCopy; 119 | [textColor addAttribute:NSBackgroundColorAttributeName value:BORDERToWidth_4_Color range:NSMakeRange(0, self.attributedText.length)]; 120 | [self setAttributedText:textColor]; 121 | } 122 | } 123 | } 124 | 125 | - (void)setNewSelectedRange:(NSRange) range 126 | { 127 | UITextPosition* beginning = self.beginningOfDocument; 128 | 129 | UITextPosition* startPosition = [self positionFromPosition:beginning offset:range.location]; 130 | UITextPosition* endPosition = [self positionFromPosition:beginning offset:range.location + range.length]; 131 | UITextRange* selectionRange = [self textRangeFromPosition:startPosition toPosition:endPosition]; 132 | 133 | [self setSelectedTextRange:selectionRange]; 134 | } 135 | 136 | - (NSRange)getSelectedRange 137 | { 138 | UITextPosition* beginning = self.beginningOfDocument; 139 | 140 | UITextRange* selectedRange = self.selectedTextRange; 141 | UITextPosition* selectionStart = selectedRange.start; 142 | UITextPosition* selectionEnd = selectedRange.end; 143 | 144 | const NSInteger location = [self offsetFromPosition:beginning toPosition:selectionStart]; 145 | const NSInteger length = [self offsetFromPosition:selectionStart toPosition:selectionEnd]; 146 | 147 | return NSMakeRange(location, length); 148 | } 149 | 150 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 151 | { 152 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 153 | UITouch *touch = [touches anyObject]; 154 | 155 | // 触摸点 156 | CGPoint point = [touch locationInView:self]; 157 | 158 | NSArray *specials = [self.attributedText attribute:@"specials" atIndex:0 effectiveRange:NULL]; 159 | BOOL contains = NO; 160 | 161 | for (ZLSpecial *special in specials) { 162 | self.selectedRange = special.range; 163 | // self.selectedRange --影响--> self.selectedTextRange 164 | // 获得选中范围的矩形框 165 | NSArray *rects = [self selectionRectsForRange:self.selectedTextRange]; 166 | // 清空选中范围 167 | self.selectedRange = NSMakeRange(0, 0); 168 | 169 | for (UITextSelectionRect *selectionRect in rects) { 170 | CGRect rect = selectionRect.rect; 171 | if (rect.size.width == 0 || rect.size.height == 0) continue; 172 | 173 | if (CGRectContainsPoint(rect, point)) { // 点中了某个特殊字符串 174 | contains = YES; 175 | break; 176 | } 177 | } 178 | 179 | if (contains) { 180 | for (UITextSelectionRect *selectionRect in rects) { 181 | CGRect rect = selectionRect.rect; 182 | if (rect.size.width == 0 || rect.size.height == 0) continue; 183 | 184 | if (special.urlString) { 185 | 186 | if (self.dataDelegate && [self.dataDelegate respondsToSelector:@selector(textWithAction:toType:)]) { 187 | [self.dataDelegate textWithAction:special.urlString toType:special.type]; 188 | break; 189 | } 190 | } 191 | } 192 | break; 193 | } 194 | } 195 | [self touchesCancelled:touches withEvent:event]; 196 | 197 | if (_textEvenTochWithBlock && !contains) { 198 | _textEvenTochWithBlock(); 199 | } 200 | }); 201 | } 202 | 203 | - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event 204 | { 205 | // 去掉特殊字符串后面的高亮背景 206 | NSMutableAttributedString *textColor = self.attributedText.mutableCopy; 207 | [textColor addAttribute:NSBackgroundColorAttributeName value:[UIColor clearColor] range:NSMakeRange(0, self.attributedText.string.length)]; 208 | [self setAttributedText:textColor]; 209 | 210 | [super touchesCancelled:touches withEvent:event]; 211 | } 212 | 213 | 214 | @end 215 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/extension/HXNewExtensionCommentView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HXNewExtensionCommentView.m 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2018/1/18. 6 | // 7 | 8 | #import "HXNewExtensionCommentView.h" 9 | #import "HXNewExtensionCommentCell.h" 10 | 11 | #import "HXDynamic.h" 12 | 13 | static NSString *const kReuseIdentifier = @"HXNewExtensionCommentCell"; 14 | 15 | @interface HXNewExtensionCommentView () 16 | 17 | 18 | 19 | @property (nonatomic, strong) HXNewExtensionLikedView *likedView; 20 | @property (nonatomic, strong) UITableView *tableView; 21 | 22 | 23 | @end 24 | 25 | @implementation HXNewExtensionCommentView 26 | 27 | - (instancetype)init 28 | { 29 | if (self = [super init]) { 30 | [self setUpView]; 31 | } 32 | return self; 33 | } 34 | 35 | - (void)setUpView 36 | { 37 | [self.tableView registerClass:[HXNewExtensionCommentCell class] forCellReuseIdentifier:kReuseIdentifier]; 38 | 39 | self.tableView.sd_layout 40 | .topSpaceToView(self, 0) 41 | .leftSpaceToView(self, 0) 42 | .rightSpaceToView(self, 0) 43 | .bottomSpaceToView(self, 0); 44 | } 45 | 46 | - (void)setModel:(HXDynamic *)model 47 | { 48 | _model = model; 49 | if (!model) { 50 | return; 51 | } 52 | if (model.praiseetrHeight) { 53 | self.likedView.frame = CGRectMake(0, 0, WIDTH_SCREEN-90, model.praiseetrHeight); 54 | self.likedView.praiseAttributed = model.praiseAttributed; 55 | [self.tableView setTableHeaderView:self.likedView]; 56 | _topView = _likedView; 57 | } 58 | else { 59 | [self.tableView setTableHeaderView:nil]; 60 | } 61 | 62 | [self.tableView reloadData]; 63 | } 64 | 65 | - (void)extensionLikedViewWithUserName:(NSString *)nickname ToType:(NSString *)type 66 | { 67 | for (NSDictionary *dict in _model.praiselist) { 68 | if ([dict[@"nickname"] isEqualToString:nickname]) { 69 | if (self.delegate && [self.delegate respondsToSelector:@selector(newExtensionCommentViewtextWithUserId:)]) { 70 | [self.delegate newExtensionCommentViewtextWithUserId:dict[@"id"]]; 71 | } 72 | } 73 | } 74 | } 75 | 76 | #pragma mark - Delegate 77 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 78 | { 79 | return self.model.commentModels.count; 80 | } 81 | 82 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 83 | { 84 | static NSString *keyHead = @"keyHead"; 85 | UITableViewHeaderFooterView *headerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:keyHead]; 86 | if (!headerView) { 87 | headerView = [[UITableViewHeaderFooterView alloc] initWithReuseIdentifier:keyHead]; 88 | UIView *backView = [[UIView alloc] init]; 89 | [headerView addSubview:backView]; 90 | 91 | backView.backgroundColor = BORDERToWidth_8_Color; 92 | backView.sd_layout 93 | .topSpaceToView(headerView, 0) 94 | .leftSpaceToView(headerView, 0) 95 | .rightSpaceToView(headerView, 0) 96 | .bottomSpaceToView(headerView, 0); 97 | 98 | } 99 | return headerView; 100 | } 101 | 102 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 103 | { 104 | NSArray *array = self.model.commentModels; 105 | HXNewExtensionCommentCell *cell = [tableView dequeueReusableCellWithIdentifier:kReuseIdentifier]; 106 | cell.model = array[indexPath.row]; 107 | cell.delegate = self; 108 | 109 | // HXWeakSelf(self); 110 | // [cell setTextWithBlock:^(NSString *text,NSString *type) { 111 | // if (weakself.delegate && [weakself.delegate respondsToSelector:@selector(newExtensionCommentViewtextWithAction:toType:)]) { 112 | // [weakself.delegate newExtensionCommentViewtextWithAction:text toType:type]; 113 | // } 114 | // }]; 115 | // 116 | // HXWeakSelf(cell); 117 | // [cell setTextEvenTochWithBlock:^(HXNewDynamicCircleComment *model) { 118 | // 119 | // if (weakself.delegate && [weakself.delegate respondsToSelector:@selector(newExtensionCommentViewDidSelectRowAtView:)]) { 120 | // [weakself.delegate newExtensionCommentViewDidSelectRowAtView:weakcell]; 121 | // } 122 | // 123 | // 124 | // if (weakself.delegate && [weakself.delegate respondsToSelector:@selector(newExtensionCommentViewDidSelectRowAtModel:)]) { 125 | // [weakself.delegate newExtensionCommentViewDidSelectRowAtModel:model]; 126 | // } 127 | // }]; 128 | 129 | return cell; 130 | } 131 | 132 | - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section 133 | { 134 | static NSString *keyHead = @"keyFooter"; 135 | UITableViewHeaderFooterView *footerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:keyHead]; 136 | if (!footerView) { 137 | footerView = [[UITableViewHeaderFooterView alloc] initWithReuseIdentifier:keyHead]; 138 | UIView *backView = [[UIView alloc] init]; 139 | [footerView addSubview:backView]; 140 | 141 | backView.backgroundColor = BORDERToWidth_8_Color; 142 | backView.sd_layout 143 | .topSpaceToView(footerView, 0) 144 | .leftSpaceToView(footerView, 0) 145 | .rightSpaceToView(footerView, 0) 146 | .bottomSpaceToView(footerView, 0); 147 | } 148 | return footerView; 149 | } 150 | 151 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section 152 | { 153 | if (self.model.commentModels.count) { 154 | return 3; 155 | } 156 | return 0.01; 157 | } 158 | 159 | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section 160 | { 161 | if (self.model.commentModels.count) { 162 | return 3; 163 | } 164 | return 0.01; 165 | } 166 | 167 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 168 | { 169 | NSArray *array = self.model.commentModels; 170 | HXNewDynamicCircleComment *model = array[indexPath.row]; 171 | return model.height; 172 | return 0; 173 | } 174 | 175 | #pragma mark - HXNewExtensionCommentCellDelegate 176 | - (void)cellDidSelectWithText:(NSString *)text type:(NSString *)type 177 | { 178 | if (self.delegate && [self.delegate respondsToSelector:@selector(newExtensionCommentViewtextWithAction:toType:)]) { 179 | [self.delegate newExtensionCommentViewtextWithAction:text toType:type]; 180 | } 181 | } 182 | 183 | - (void)cellTextEvenTochWithModel:(HXNewDynamicCircleComment *)model 184 | { 185 | if (self.delegate && [self.delegate respondsToSelector:@selector(newExtensionCommentViewDidSelectRowAtModel:)]) { 186 | [self.delegate newExtensionCommentViewDidSelectRowAtModel:model]; 187 | } 188 | } 189 | 190 | 191 | - (UITableView *)tableView 192 | { 193 | if (!_tableView) { 194 | _tableView = [[UITableView alloc] init]; 195 | _tableView.backgroundColor = BORDERToWidth_8_Color; 196 | _tableView.delegate = self; 197 | _tableView.dataSource = self; 198 | _tableView.scrollEnabled = NO; 199 | _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 200 | _tableView.estimatedRowHeight = 0; 201 | _tableView.estimatedSectionFooterHeight = 0; 202 | _tableView.estimatedSectionHeaderHeight = 0; 203 | [self addSubview:_tableView]; 204 | 205 | _tableView.layer.cornerRadius = 4; 206 | _tableView.layer.masksToBounds = YES; 207 | } 208 | return _tableView; 209 | } 210 | 211 | - (HXNewExtensionLikedView *)likedView 212 | { 213 | if (!_likedView) { 214 | _likedView = [HXNewExtensionLikedView new]; 215 | HXWeakSelf(self); 216 | [_likedView setExtensionLikedViewWithUserIdBlock:^(NSString *text,NSString *type) { 217 | [weakself extensionLikedViewWithUserName:text ToType:type]; 218 | }]; 219 | } 220 | return _likedView; 221 | } 222 | 223 | @end 224 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/Other/HXDynamicCircleImageView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HXDynamicCircleImageView.m 3 | // HongXun 4 | // 5 | // Created by 张炯 on 2017/11/28. 6 | // 7 | 8 | #import "HXDynamicCircleImageView.h" 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | 15 | #define WIDTH_IMAGE_ONE (WIDTH_SCREEN - 70) * 0.4 16 | #define WIDTH_IMAGE (WIDTH_SCREEN - 70) * 0.31 17 | #define SPACE 4.0 18 | 19 | @interface HXDynamicCircleImageView () 20 | 21 | @property (nonatomic, strong) NSMutableArray *imageViews; 22 | 23 | @property (nonatomic, strong) UIImage *thumb; 24 | 25 | @end 26 | 27 | @implementation HXDynamicCircleImageView 28 | 29 | - (instancetype)init 30 | { 31 | if (self = [super init]) { 32 | 33 | self.clipsToBounds = YES; 34 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backViewTagWithAction)]; 35 | tap.cancelsTouchesInView = NO; 36 | [self addGestureRecognizer:tap]; 37 | 38 | CGFloat cellW = 100; 39 | CGFloat padding = (WIDTH_SCREEN - cellW * 3 ) / 2 - 10; 40 | 41 | _imageViews = @[].mutableCopy; 42 | for (int i = 0; i < 9; ++i) { 43 | int row = i / 3; 44 | int col = i % 3; 45 | 46 | FLAnimatedImageView *imageView = [[FLAnimatedImageView alloc] init]; 47 | imageView.tag = i; 48 | imageView.userInteractionEnabled = YES; 49 | imageView.contentMode = UIViewContentModeScaleAspectFill; 50 | imageView.clipsToBounds = YES; 51 | [self addSubview:imageView]; 52 | 53 | CGFloat cellX = padding + col * (cellW + 5); 54 | CGFloat cellY = row * (cellW + 5) + 18; 55 | imageView.frame = CGRectMake(cellX, cellY, cellW, cellW); 56 | 57 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(buttonClicked:)]; 58 | [imageView addGestureRecognizer:tap]; 59 | 60 | [_imageViews addObject:imageView]; 61 | 62 | UILabel *gifLable = [[UILabel alloc] init]; 63 | gifLable.text = @"GIF"; 64 | gifLable.hidden = YES; 65 | gifLable.tag = 777; 66 | gifLable.textColor = [UIColor whiteColor]; 67 | gifLable.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.8]; 68 | gifLable.textAlignment = NSTextAlignmentCenter; 69 | gifLable.font = [UIFont systemFontOfSize:10]; 70 | [imageView addSubview:gifLable]; 71 | 72 | gifLable.sd_layout 73 | .bottomSpaceToView(imageView, 0) 74 | .rightSpaceToView(imageView, 0) 75 | .widthIs(30) 76 | .heightIs(15); 77 | } 78 | } 79 | return self; 80 | } 81 | 82 | - (void)backViewTagWithAction 83 | { 84 | 85 | } 86 | 87 | - (void)setSpicpaths:(NSArray *)spicpaths 88 | { 89 | _spicpaths = spicpaths; 90 | 91 | if (spicpaths.count == 0) { 92 | return; 93 | } 94 | 95 | CGFloat imageWidth; 96 | CGFloat imageHeight; 97 | if (spicpaths.count == 1) { 98 | imageWidth = WIDTH_IMAGE_ONE; 99 | imageHeight = imageWidth / WIDTH_SCREEN * HEIGHT_SCREEN;//imageWidth * 0.8; 100 | } 101 | else { 102 | imageHeight = imageWidth = WIDTH_IMAGE; 103 | } 104 | 105 | 106 | CGFloat x = 0; 107 | CGFloat y = 0; 108 | for (int i = 0; i < 9; i++) { 109 | FLAnimatedImageView *imageView = self.imageViews[i]; 110 | if (i < self.spicpaths.count) { 111 | 112 | imageView.hidden = NO; 113 | [imageView setFrame:CGRectMake(x, y, imageWidth, imageHeight)]; 114 | 115 | NSString *url = [NSString stringWithFormat:@"%@%@",@"",spicpaths[i]]; 116 | HXWeakSelf(self); 117 | 118 | UILabel *gifLable = [imageView viewWithTag:777]; 119 | gifLable.hidden = YES; 120 | gifLable.text = @""; 121 | 122 | if (url.length) { 123 | 124 | // 角标 125 | if (self.bpicpaths && self.bpicpaths.count == self.spicpaths.count) { 126 | NSString *bt = self.bpicpaths[i]; 127 | if ([bt rangeOfString:@"gif"].length > 0) { 128 | gifLable.hidden = NO; 129 | gifLable.text = @"GIF"; 130 | } 131 | else if ([bt rangeOfString:@"mp4"].length > 0) { 132 | gifLable.hidden = NO; 133 | gifLable.text = @"MP4"; 134 | } 135 | } 136 | 137 | // gif 138 | if ([url rangeOfString:@"gif"].length > 0) { 139 | 140 | gifLable.hidden = NO; 141 | gifLable.text = @"GIF"; 142 | 143 | // NSData *imageData = [[SDImageCache sharedImageCache] diskImageDataBySearchingAllPathsForKey:url]; 144 | // 145 | // if (imageData) { 146 | // imageView.animatedImage = [FLAnimatedImage animatedImageWithGIFData:imageData]; 147 | // } 148 | // else { 149 | // [[SDWebImageDownloader sharedDownloader] downloadImageWithURL:[NSURL URLWithString:url] options:SDWebImageDownloaderUseNSURLCache progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) { 150 | // } completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) { 151 | // if (image) { 152 | // [[SDImageCache sharedImageCache] storeImageDataToDisk:data forKey:url]; 153 | // 154 | // dispatch_async(dispatch_get_main_queue(), ^{ 155 | // imageView.animatedImage = [FLAnimatedImage animatedImageWithGIFData:data]; 156 | // }); 157 | // } 158 | // }]; 159 | // } 160 | } 161 | else if ([gifLable.text isEqualToString:@"MP4"]) { 162 | 163 | NSString *btUrl = self.bpicpaths[i]; 164 | if (!self.thumb) { 165 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 166 | UIImage *image = [self getThumbnailImage:[NSString stringWithFormat:@"%@%@",@"",btUrl]]; 167 | dispatch_async(dispatch_get_main_queue(), ^{ 168 | imageView.image = image; 169 | self.thumb = image; 170 | [self setNeedsLayout]; 171 | }); 172 | }); 173 | } 174 | else { 175 | imageView.image = self.thumb; 176 | } 177 | } 178 | else { 179 | [imageView sd_setImageWithURL:HXURL(url) placeholderImage:[UIImage imageNamed:@"loading_commodity"]]; 180 | } 181 | } 182 | 183 | if ((i != 0 && spicpaths.count != 4 && (i + 1) % 3 == 0) || (spicpaths.count == 4 && i == 1)) { 184 | y += (imageHeight + SPACE); 185 | x = 0; 186 | } 187 | else { 188 | x += (imageWidth + SPACE); 189 | } 190 | } 191 | else { 192 | 193 | imageView.hidden = YES; 194 | } 195 | } 196 | } 197 | 198 | - (void)setOne_img_width:(CGFloat)one_img_width 199 | { 200 | FLAnimatedImageView *imageView = self.imageViews.firstObject; 201 | 202 | if (one_img_width == imageView.width) { 203 | return; 204 | } 205 | 206 | _one_img_width = one_img_width; 207 | imageView.width = one_img_width; 208 | } 209 | 210 | - (void)setOne_img_height:(CGFloat)one_img_height 211 | { 212 | FLAnimatedImageView *imageView = self.imageViews.firstObject; 213 | 214 | if (one_img_height == imageView.height) { 215 | return; 216 | } 217 | 218 | _one_img_height = one_img_height; 219 | imageView.height = one_img_height; 220 | } 221 | 222 | - (UIImage *)thumbnailWithImage:(UIImage *)originalImage size:(CGSize)size 223 | { 224 | CGSize originalsize = [originalImage size]; 225 | //原图长宽均小于标准长宽的,不作处理返回原图 226 | if (originalsize.widthsize.width && originalsize.height>size.height) 233 | { 234 | CGFloat rate = 1.0; 235 | CGFloat widthRate = originalsize.width/size.width; 236 | CGFloat heightRate = originalsize.height/size.height; 237 | rate = widthRate>heightRate?heightRate:widthRate; 238 | CGImageRef imageRef = nil; 239 | 240 | if (heightRate>widthRate) 241 | { 242 | imageRef = CGImageCreateWithImageInRect([originalImage CGImage], CGRectMake(0, originalsize.height/2-size.height*rate/2, originalsize.width, size.height*rate));//获取图片整体部分 243 | } 244 | else 245 | { 246 | imageRef = CGImageCreateWithImageInRect([originalImage CGImage], CGRectMake(originalsize.width/2-size.width*rate/2, 0, size.width*rate, originalsize.height));//获取图片整体部分 247 | } 248 | 249 | UIGraphicsBeginImageContext(size);//指定要绘画图片的大小 250 | CGContextRef con = UIGraphicsGetCurrentContext(); 251 | CGContextTranslateCTM(con, 0.0, size.height); 252 | CGContextScaleCTM(con, 1.0, -1.0); 253 | CGContextDrawImage(con, CGRectMake(0, 0, size.width, size.height), imageRef); 254 | UIImage *standardImage = UIGraphicsGetImageFromCurrentImageContext(); 255 | UIGraphicsEndImageContext(); 256 | CGImageRelease(imageRef); 257 | return standardImage; 258 | } 259 | //原图长宽有一项大于标准长宽的,对大于标准的那一项进行裁剪,另一项保持不变 260 | else if(originalsize.height>size.height || originalsize.width>size.width) 261 | { 262 | CGImageRef imageRef = nil; 263 | if(originalsize.height>size.height) 264 | { 265 | imageRef = CGImageCreateWithImageInRect([originalImage CGImage], CGRectMake(0, 0, originalsize.width, size.height));//获取图片整体部分 266 | } 267 | else if (originalsize.width>size.width) 268 | { 269 | imageRef = CGImageCreateWithImageInRect([originalImage CGImage], CGRectMake(0, 0, size.width, originalsize.height));//获取图片整体部分 270 | } 271 | UIGraphicsBeginImageContext(size);//指定要绘画图片的大小 272 | CGContextRef con = UIGraphicsGetCurrentContext(); 273 | CGContextTranslateCTM(con, 0.0, size.height); 274 | CGContextScaleCTM(con, 1.0, -1.0); 275 | CGContextDrawImage(con, CGRectMake(0, 0, size.width, size.height), imageRef); 276 | UIImage *standardImage = UIGraphicsGetImageFromCurrentImageContext(); 277 | UIGraphicsEndImageContext(); 278 | CGImageRelease(imageRef); 279 | return standardImage; 280 | } 281 | //原图为标准长宽的,不做处理 282 | else 283 | { 284 | return originalImage; 285 | } 286 | } 287 | 288 | - (void)removeAllSubViews 289 | { 290 | for (id view in self.subviews) { 291 | [view removeFromSuperview]; 292 | } 293 | } 294 | 295 | #pragma mark - # Event Response 296 | - (void)buttonClicked:(UITapGestureRecognizer *)sender 297 | { 298 | NSMutableArray *images = @[].mutableCopy; 299 | NSMutableArray *imageViews = @[].mutableCopy; 300 | NSMutableArray *_imageViewFrameArray = @[].mutableCopy; 301 | 302 | NSInteger i = 0; 303 | for (FLAnimatedImageView *imageView in self.imageViews) { 304 | if (i < _spicpaths.count) { 305 | [imageViews addObject:imageView]; 306 | 307 | if (imageView.image) { 308 | [images addObject:imageView.image]; 309 | } 310 | 311 | CGPoint fromCenter = [imageView 312 | convertPoint:CGPointMake(0, 0) 313 | toView:[UIApplication sharedApplication].keyWindow]; 314 | 315 | NSValue *frameValue = [NSValue valueWithCGRect:CGRectMake(fromCenter.x, fromCenter.y, imageView.frame.size.width, imageView.frame.size.height)]; 316 | 317 | [_imageViewFrameArray addObject:frameValue]; 318 | } 319 | ++i; 320 | } 321 | 322 | if (_dynamicCircleImageViewWithBlock) { 323 | _dynamicCircleImageViewWithBlock(sender.view.tag,images.copy,imageViews,_bpicpaths,_imageViewFrameArray); 324 | } 325 | } 326 | 327 | - (UIImage *)getThumbnailImage:(NSString *)videoURL 328 | 329 | { 330 | 331 | AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:[NSURL fileURLWithPath:videoURL] options:nil]; 332 | 333 | AVAssetImageGenerator *gen = [[AVAssetImageGenerator alloc] initWithAsset:asset]; 334 | 335 | gen.appliesPreferredTrackTransform = YES; 336 | 337 | CMTime time = CMTimeMakeWithSeconds(0.0, 600); 338 | 339 | NSError *error = nil; 340 | 341 | CMTime actualTime; 342 | 343 | CGImageRef image = [gen copyCGImageAtTime:time actualTime:&actualTime error:&error]; 344 | 345 | UIImage *thumb = [[UIImage alloc] initWithCGImage:image]; 346 | 347 | CGImageRelease(image); 348 | 349 | return thumb; 350 | } 351 | 352 | @end 353 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1A3C415591A579DCCF642A4B74C34A73 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 11 | 3EDD62BCD880DBF197577C039C82E31B /* Pods-DynamicCircle-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 603C626E18CB38A0F48539B13F392203 /* Pods-DynamicCircle-dummy.m */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | 2C2BE723EA70850057A935B7BC9CF286 /* Pods-DynamicCircle.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DynamicCircle.release.xcconfig"; sourceTree = ""; }; 16 | 45F8E483A767721EA5623DC1BE61AE35 /* Pods-DynamicCircle-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DynamicCircle-frameworks.sh"; sourceTree = ""; }; 17 | 603C626E18CB38A0F48539B13F392203 /* Pods-DynamicCircle-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DynamicCircle-dummy.m"; sourceTree = ""; }; 18 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 19 | 7CD35F9F16154923B42B76D1C89B9057 /* Pods-DynamicCircle.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DynamicCircle.debug.xcconfig"; sourceTree = ""; }; 20 | 7F2DF262CAE934A356E596C9B938B8C9 /* Pods-DynamicCircle-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DynamicCircle-acknowledgements.markdown"; sourceTree = ""; }; 21 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 22 | 9AB08D37D43B8A3ED3B18F10A4177077 /* libPods-DynamicCircle.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-DynamicCircle.a"; path = "libPods-DynamicCircle.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | B9B71A23998027F81A4463BDE03B29EB /* Pods-DynamicCircle-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DynamicCircle-resources.sh"; sourceTree = ""; }; 24 | E0BC9EF3E93516A9D36FF7E6944B022C /* Pods-DynamicCircle-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DynamicCircle-acknowledgements.plist"; sourceTree = ""; }; 25 | /* End PBXFileReference section */ 26 | 27 | /* Begin PBXFrameworksBuildPhase section */ 28 | 42EEBA0EC6E6A424106E32C161497D14 /* Frameworks */ = { 29 | isa = PBXFrameworksBuildPhase; 30 | buildActionMask = 2147483647; 31 | files = ( 32 | 1A3C415591A579DCCF642A4B74C34A73 /* Foundation.framework in Frameworks */, 33 | ); 34 | runOnlyForDeploymentPostprocessing = 0; 35 | }; 36 | /* End PBXFrameworksBuildPhase section */ 37 | 38 | /* Begin PBXGroup section */ 39 | 02733C87FF855321919C4F282B98BDCC /* Products */ = { 40 | isa = PBXGroup; 41 | children = ( 42 | 9AB08D37D43B8A3ED3B18F10A4177077 /* libPods-DynamicCircle.a */, 43 | ); 44 | name = Products; 45 | sourceTree = ""; 46 | }; 47 | 7DB346D0F39D3F0E887471402A8071AB = { 48 | isa = PBXGroup; 49 | children = ( 50 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 51 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 52 | 02733C87FF855321919C4F282B98BDCC /* Products */, 53 | 9473125D56FBAF54034EEAA01238B555 /* Targets Support Files */, 54 | ); 55 | sourceTree = ""; 56 | }; 57 | 9473125D56FBAF54034EEAA01238B555 /* Targets Support Files */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | C1099AC975CC003BB4521890424603C9 /* Pods-DynamicCircle */, 61 | ); 62 | name = "Targets Support Files"; 63 | sourceTree = ""; 64 | }; 65 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | D35AF013A5F0BAD4F32504907A52519E /* iOS */, 69 | ); 70 | name = Frameworks; 71 | sourceTree = ""; 72 | }; 73 | C1099AC975CC003BB4521890424603C9 /* Pods-DynamicCircle */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 7F2DF262CAE934A356E596C9B938B8C9 /* Pods-DynamicCircle-acknowledgements.markdown */, 77 | E0BC9EF3E93516A9D36FF7E6944B022C /* Pods-DynamicCircle-acknowledgements.plist */, 78 | 603C626E18CB38A0F48539B13F392203 /* Pods-DynamicCircle-dummy.m */, 79 | 45F8E483A767721EA5623DC1BE61AE35 /* Pods-DynamicCircle-frameworks.sh */, 80 | B9B71A23998027F81A4463BDE03B29EB /* Pods-DynamicCircle-resources.sh */, 81 | 7CD35F9F16154923B42B76D1C89B9057 /* Pods-DynamicCircle.debug.xcconfig */, 82 | 2C2BE723EA70850057A935B7BC9CF286 /* Pods-DynamicCircle.release.xcconfig */, 83 | ); 84 | name = "Pods-DynamicCircle"; 85 | path = "Target Support Files/Pods-DynamicCircle"; 86 | sourceTree = ""; 87 | }; 88 | D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, 92 | ); 93 | name = iOS; 94 | sourceTree = ""; 95 | }; 96 | /* End PBXGroup section */ 97 | 98 | /* Begin PBXNativeTarget section */ 99 | F0437901E8FEECC369D9E340EB40D65E /* Pods-DynamicCircle */ = { 100 | isa = PBXNativeTarget; 101 | buildConfigurationList = 09314CFFA3C56489271834482878A23B /* Build configuration list for PBXNativeTarget "Pods-DynamicCircle" */; 102 | buildPhases = ( 103 | 1FB890F2AEDF76C7F5E380E304528CF7 /* Sources */, 104 | 42EEBA0EC6E6A424106E32C161497D14 /* Frameworks */, 105 | ); 106 | buildRules = ( 107 | ); 108 | dependencies = ( 109 | ); 110 | name = "Pods-DynamicCircle"; 111 | productName = "Pods-DynamicCircle"; 112 | productReference = 9AB08D37D43B8A3ED3B18F10A4177077 /* libPods-DynamicCircle.a */; 113 | productType = "com.apple.product-type.library.static"; 114 | }; 115 | /* End PBXNativeTarget section */ 116 | 117 | /* Begin PBXProject section */ 118 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 119 | isa = PBXProject; 120 | attributes = { 121 | LastSwiftUpdateCheck = 0930; 122 | LastUpgradeCheck = 0930; 123 | }; 124 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 125 | compatibilityVersion = "Xcode 3.2"; 126 | developmentRegion = English; 127 | hasScannedForEncodings = 0; 128 | knownRegions = ( 129 | en, 130 | ); 131 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 132 | productRefGroup = 02733C87FF855321919C4F282B98BDCC /* Products */; 133 | projectDirPath = ""; 134 | projectRoot = ""; 135 | targets = ( 136 | F0437901E8FEECC369D9E340EB40D65E /* Pods-DynamicCircle */, 137 | ); 138 | }; 139 | /* End PBXProject section */ 140 | 141 | /* Begin PBXSourcesBuildPhase section */ 142 | 1FB890F2AEDF76C7F5E380E304528CF7 /* Sources */ = { 143 | isa = PBXSourcesBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | 3EDD62BCD880DBF197577C039C82E31B /* Pods-DynamicCircle-dummy.m in Sources */, 147 | ); 148 | runOnlyForDeploymentPostprocessing = 0; 149 | }; 150 | /* End PBXSourcesBuildPhase section */ 151 | 152 | /* Begin XCBuildConfiguration section */ 153 | 1EE19F5DD95931924296F637BF18BD8F /* Debug */ = { 154 | isa = XCBuildConfiguration; 155 | buildSettings = { 156 | ALWAYS_SEARCH_USER_PATHS = NO; 157 | CLANG_ANALYZER_NONNULL = YES; 158 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 159 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 160 | CLANG_CXX_LIBRARY = "libc++"; 161 | CLANG_ENABLE_MODULES = YES; 162 | CLANG_ENABLE_OBJC_ARC = YES; 163 | CLANG_ENABLE_OBJC_WEAK = YES; 164 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 165 | CLANG_WARN_BOOL_CONVERSION = YES; 166 | CLANG_WARN_COMMA = YES; 167 | CLANG_WARN_CONSTANT_CONVERSION = YES; 168 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 169 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 170 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 171 | CLANG_WARN_EMPTY_BODY = YES; 172 | CLANG_WARN_ENUM_CONVERSION = YES; 173 | CLANG_WARN_INFINITE_RECURSION = YES; 174 | CLANG_WARN_INT_CONVERSION = YES; 175 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 176 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 177 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 178 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 179 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 180 | CLANG_WARN_STRICT_PROTOTYPES = YES; 181 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 182 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 183 | CLANG_WARN_UNREACHABLE_CODE = YES; 184 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 185 | CODE_SIGNING_ALLOWED = NO; 186 | CODE_SIGNING_REQUIRED = NO; 187 | COPY_PHASE_STRIP = NO; 188 | DEBUG_INFORMATION_FORMAT = dwarf; 189 | ENABLE_STRICT_OBJC_MSGSEND = YES; 190 | ENABLE_TESTABILITY = YES; 191 | GCC_C_LANGUAGE_STANDARD = gnu11; 192 | GCC_DYNAMIC_NO_PIC = NO; 193 | GCC_NO_COMMON_BLOCKS = YES; 194 | GCC_OPTIMIZATION_LEVEL = 0; 195 | GCC_PREPROCESSOR_DEFINITIONS = ( 196 | "POD_CONFIGURATION_DEBUG=1", 197 | "DEBUG=1", 198 | "$(inherited)", 199 | ); 200 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 201 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 202 | GCC_WARN_UNDECLARED_SELECTOR = YES; 203 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 204 | GCC_WARN_UNUSED_FUNCTION = YES; 205 | GCC_WARN_UNUSED_VARIABLE = YES; 206 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 207 | MTL_ENABLE_DEBUG_INFO = YES; 208 | ONLY_ACTIVE_ARCH = YES; 209 | PRODUCT_NAME = "$(TARGET_NAME)"; 210 | STRIP_INSTALLED_PRODUCT = NO; 211 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 212 | SYMROOT = "${SRCROOT}/../build"; 213 | }; 214 | name = Debug; 215 | }; 216 | 480F936BDDF3D23C5CE19A0E598366BC /* Release */ = { 217 | isa = XCBuildConfiguration; 218 | baseConfigurationReference = 2C2BE723EA70850057A935B7BC9CF286 /* Pods-DynamicCircle.release.xcconfig */; 219 | buildSettings = { 220 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 221 | CODE_SIGN_IDENTITY = "iPhone Developer"; 222 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 223 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 224 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 225 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 226 | MACH_O_TYPE = staticlib; 227 | OTHER_LDFLAGS = ""; 228 | OTHER_LIBTOOLFLAGS = ""; 229 | PODS_ROOT = "$(SRCROOT)"; 230 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 231 | SDKROOT = iphoneos; 232 | SKIP_INSTALL = YES; 233 | TARGETED_DEVICE_FAMILY = "1,2"; 234 | VALIDATE_PRODUCT = YES; 235 | }; 236 | name = Release; 237 | }; 238 | 6BEF99D352D6315DDC310164E53918BB /* Debug */ = { 239 | isa = XCBuildConfiguration; 240 | baseConfigurationReference = 7CD35F9F16154923B42B76D1C89B9057 /* Pods-DynamicCircle.debug.xcconfig */; 241 | buildSettings = { 242 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 243 | CODE_SIGN_IDENTITY = "iPhone Developer"; 244 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 245 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 246 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 247 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 248 | MACH_O_TYPE = staticlib; 249 | OTHER_LDFLAGS = ""; 250 | OTHER_LIBTOOLFLAGS = ""; 251 | PODS_ROOT = "$(SRCROOT)"; 252 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 253 | SDKROOT = iphoneos; 254 | SKIP_INSTALL = YES; 255 | TARGETED_DEVICE_FAMILY = "1,2"; 256 | }; 257 | name = Debug; 258 | }; 259 | F4568DEE257655D290C2B9CEAB37C934 /* Release */ = { 260 | isa = XCBuildConfiguration; 261 | buildSettings = { 262 | ALWAYS_SEARCH_USER_PATHS = NO; 263 | CLANG_ANALYZER_NONNULL = YES; 264 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 265 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 266 | CLANG_CXX_LIBRARY = "libc++"; 267 | CLANG_ENABLE_MODULES = YES; 268 | CLANG_ENABLE_OBJC_ARC = YES; 269 | CLANG_ENABLE_OBJC_WEAK = YES; 270 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 271 | CLANG_WARN_BOOL_CONVERSION = YES; 272 | CLANG_WARN_COMMA = YES; 273 | CLANG_WARN_CONSTANT_CONVERSION = YES; 274 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 275 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 276 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 277 | CLANG_WARN_EMPTY_BODY = YES; 278 | CLANG_WARN_ENUM_CONVERSION = YES; 279 | CLANG_WARN_INFINITE_RECURSION = YES; 280 | CLANG_WARN_INT_CONVERSION = YES; 281 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 282 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 283 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 284 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 285 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 286 | CLANG_WARN_STRICT_PROTOTYPES = YES; 287 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 288 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 289 | CLANG_WARN_UNREACHABLE_CODE = YES; 290 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 291 | CODE_SIGNING_ALLOWED = NO; 292 | CODE_SIGNING_REQUIRED = NO; 293 | COPY_PHASE_STRIP = NO; 294 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 295 | ENABLE_NS_ASSERTIONS = NO; 296 | ENABLE_STRICT_OBJC_MSGSEND = YES; 297 | GCC_C_LANGUAGE_STANDARD = gnu11; 298 | GCC_NO_COMMON_BLOCKS = YES; 299 | GCC_PREPROCESSOR_DEFINITIONS = ( 300 | "POD_CONFIGURATION_RELEASE=1", 301 | "$(inherited)", 302 | ); 303 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 304 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 305 | GCC_WARN_UNDECLARED_SELECTOR = YES; 306 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 307 | GCC_WARN_UNUSED_FUNCTION = YES; 308 | GCC_WARN_UNUSED_VARIABLE = YES; 309 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 310 | MTL_ENABLE_DEBUG_INFO = NO; 311 | PRODUCT_NAME = "$(TARGET_NAME)"; 312 | STRIP_INSTALLED_PRODUCT = NO; 313 | SYMROOT = "${SRCROOT}/../build"; 314 | }; 315 | name = Release; 316 | }; 317 | /* End XCBuildConfiguration section */ 318 | 319 | /* Begin XCConfigurationList section */ 320 | 09314CFFA3C56489271834482878A23B /* Build configuration list for PBXNativeTarget "Pods-DynamicCircle" */ = { 321 | isa = XCConfigurationList; 322 | buildConfigurations = ( 323 | 6BEF99D352D6315DDC310164E53918BB /* Debug */, 324 | 480F936BDDF3D23C5CE19A0E598366BC /* Release */, 325 | ); 326 | defaultConfigurationIsVisible = 0; 327 | defaultConfigurationName = Release; 328 | }; 329 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 330 | isa = XCConfigurationList; 331 | buildConfigurations = ( 332 | 1EE19F5DD95931924296F637BF18BD8F /* Debug */, 333 | F4568DEE257655D290C2B9CEAB37C934 /* Release */, 334 | ); 335 | defaultConfigurationIsVisible = 0; 336 | defaultConfigurationName = Release; 337 | }; 338 | /* End XCConfigurationList section */ 339 | }; 340 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 341 | } 342 | -------------------------------------------------------------------------------- /DynamicCircle/Other/RegexKitLite/RegexKitLite.h: -------------------------------------------------------------------------------- 1 | // 2 | // RegexKitLite.h 3 | // http://regexkit.sourceforge.net/ 4 | // Licensed under the terms of the BSD License, as specified below. 5 | // 6 | 7 | /* 8 | Copyright (c) 2008-2010, John Engelhart 9 | 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without 13 | modification, are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the distribution. 21 | 22 | * Neither the name of the Zang Industries nor the names of its 23 | contributors may be used to endorse or promote products derived from 24 | this software without specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 30 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 32 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 33 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 34 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 35 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 36 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | */ 38 | 39 | #ifdef __OBJC__ 40 | #import 41 | #import 42 | #import 43 | #import 44 | #import 45 | #endif // __OBJC__ 46 | 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | 53 | #ifdef __cplusplus 54 | extern "C" { 55 | #endif 56 | 57 | #ifndef REGEXKITLITE_VERSION_DEFINED 58 | #define REGEXKITLITE_VERSION_DEFINED 59 | 60 | #define _RKL__STRINGIFY(b) #b 61 | #define _RKL_STRINGIFY(a) _RKL__STRINGIFY(a) 62 | #define _RKL_JOIN_VERSION(a,b) _RKL_STRINGIFY(a##.##b) 63 | #define _RKL_VERSION_STRING(a,b) _RKL_JOIN_VERSION(a,b) 64 | 65 | #define REGEXKITLITE_VERSION_MAJOR 4 66 | #define REGEXKITLITE_VERSION_MINOR 0 67 | 68 | #define REGEXKITLITE_VERSION_CSTRING _RKL_VERSION_STRING(REGEXKITLITE_VERSION_MAJOR, REGEXKITLITE_VERSION_MINOR) 69 | #define REGEXKITLITE_VERSION_NSSTRING @REGEXKITLITE_VERSION_CSTRING 70 | 71 | #endif // REGEXKITLITE_VERSION_DEFINED 72 | 73 | #if !defined(RKL_BLOCKS) && defined(NS_BLOCKS_AVAILABLE) && (NS_BLOCKS_AVAILABLE == 1) 74 | #define RKL_BLOCKS 1 75 | #endif 76 | 77 | #if defined(RKL_BLOCKS) && (RKL_BLOCKS == 1) 78 | #define _RKL_BLOCKS_ENABLED 1 79 | #endif // defined(RKL_BLOCKS) && (RKL_BLOCKS == 1) 80 | 81 | #if defined(_RKL_BLOCKS_ENABLED) && !defined(__BLOCKS__) 82 | #warning RegexKitLite support for Blocks is enabled, but __BLOCKS__ is not defined. This compiler may not support Blocks, in which case the behavior is undefined. This will probably cause numerous compiler errors. 83 | #endif // defined(_RKL_BLOCKS_ENABLED) && !defined(__BLOCKS__) 84 | 85 | // For Mac OS X < 10.5. 86 | #ifndef NSINTEGER_DEFINED 87 | #define NSINTEGER_DEFINED 88 | #if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 89 | typedef long NSInteger; 90 | typedef unsigned long NSUInteger; 91 | #define NSIntegerMin LONG_MIN 92 | #define NSIntegerMax LONG_MAX 93 | #define NSUIntegerMax ULONG_MAX 94 | #else // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 95 | typedef int NSInteger; 96 | typedef unsigned int NSUInteger; 97 | #define NSIntegerMin INT_MIN 98 | #define NSIntegerMax INT_MAX 99 | #define NSUIntegerMax UINT_MAX 100 | #endif // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 101 | #endif // NSINTEGER_DEFINED 102 | 103 | #ifndef RKLREGEXOPTIONS_DEFINED 104 | #define RKLREGEXOPTIONS_DEFINED 105 | 106 | // These must be identical to their ICU regex counterparts. See http://www.icu-project.org/userguide/regexp.html 107 | enum { 108 | RKLNoOptions = 0, 109 | RKLCaseless = 2, 110 | RKLComments = 4, 111 | RKLDotAll = 32, 112 | RKLMultiline = 8, 113 | RKLUnicodeWordBoundaries = 256 114 | }; 115 | typedef uint32_t RKLRegexOptions; // This must be identical to the ICU 'flags' argument type. 116 | 117 | #endif // RKLREGEXOPTIONS_DEFINED 118 | 119 | #ifndef RKLREGEXENUMERATIONOPTIONS_DEFINED 120 | #define RKLREGEXENUMERATIONOPTIONS_DEFINED 121 | 122 | enum { 123 | RKLRegexEnumerationNoOptions = 0UL, 124 | RKLRegexEnumerationCapturedStringsNotRequired = 1UL << 9, 125 | RKLRegexEnumerationReleaseStringReturnedByReplacementBlock = 1UL << 10, 126 | RKLRegexEnumerationFastCapturedStringsXXX = 1UL << 11, 127 | }; 128 | typedef NSUInteger RKLRegexEnumerationOptions; 129 | 130 | #endif // RKLREGEXENUMERATIONOPTIONS_DEFINED 131 | 132 | #ifndef _REGEXKITLITE_H_ 133 | #define _REGEXKITLITE_H_ 134 | 135 | #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__APPLE_CC__) && (__APPLE_CC__ >= 5465) 136 | #define RKL_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) 137 | #else 138 | #define RKL_DEPRECATED_ATTRIBUTE 139 | #endif 140 | 141 | #if defined(NS_REQUIRES_NIL_TERMINATION) 142 | #define RKL_REQUIRES_NIL_TERMINATION NS_REQUIRES_NIL_TERMINATION 143 | #else // defined(NS_REQUIRES_NIL_TERMINATION) 144 | #define RKL_REQUIRES_NIL_TERMINATION 145 | #endif // defined(NS_REQUIRES_NIL_TERMINATION) 146 | 147 | // This requires a few levels of rewriting to get the desired results. 148 | #define _RKL_CONCAT_2(c,d) c ## d 149 | #define _RKL_CONCAT(a,b) _RKL_CONCAT_2(a,b) 150 | 151 | #ifdef RKL_PREPEND_TO_METHODS 152 | #define RKL_METHOD_PREPEND(x) _RKL_CONCAT(RKL_PREPEND_TO_METHODS, x) 153 | #else // RKL_PREPEND_TO_METHODS 154 | #define RKL_METHOD_PREPEND(x) x 155 | #endif // RKL_PREPEND_TO_METHODS 156 | 157 | // If it looks like low memory notifications might be available, add code to register and respond to them. 158 | // This is (should be) harmless if it turns out that this isn't the case, since the notification that we register for, 159 | // UIApplicationDidReceiveMemoryWarningNotification, is dynamically looked up via dlsym(). 160 | #if ((defined(TARGET_OS_EMBEDDED) && (TARGET_OS_EMBEDDED != 0)) || (defined(TARGET_OS_IPHONE) && (TARGET_OS_IPHONE != 0))) && (!defined(RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS) || (RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS != 0)) 161 | #define RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS 1 162 | #endif 163 | 164 | #ifdef __OBJC__ 165 | 166 | // NSException exception name. 167 | extern NSString * const RKLICURegexException; 168 | 169 | // NSError error domains and user info keys. 170 | extern NSString * const RKLICURegexErrorDomain; 171 | 172 | extern NSString * const RKLICURegexEnumerationOptionsErrorKey; 173 | extern NSString * const RKLICURegexErrorCodeErrorKey; 174 | extern NSString * const RKLICURegexErrorNameErrorKey; 175 | extern NSString * const RKLICURegexLineErrorKey; 176 | extern NSString * const RKLICURegexOffsetErrorKey; 177 | extern NSString * const RKLICURegexPreContextErrorKey; 178 | extern NSString * const RKLICURegexPostContextErrorKey; 179 | extern NSString * const RKLICURegexRegexErrorKey; 180 | extern NSString * const RKLICURegexRegexOptionsErrorKey; 181 | extern NSString * const RKLICURegexReplacedCountErrorKey; 182 | extern NSString * const RKLICURegexReplacedStringErrorKey; 183 | extern NSString * const RKLICURegexReplacementStringErrorKey; 184 | extern NSString * const RKLICURegexSubjectRangeErrorKey; 185 | extern NSString * const RKLICURegexSubjectStringErrorKey; 186 | 187 | @interface NSString (RegexKitLiteAdditions) 188 | 189 | + (void)RKL_METHOD_PREPEND(clearStringCache); 190 | 191 | // Although these are marked as deprecated, a bug in GCC prevents a warning from being issues for + class methods. Filed bug with Apple, #6736857. 192 | + (NSInteger)RKL_METHOD_PREPEND(captureCountForRegex):(NSString *)regex RKL_DEPRECATED_ATTRIBUTE; 193 | + (NSInteger)RKL_METHOD_PREPEND(captureCountForRegex):(NSString *)regex options:(RKLRegexOptions)options error:(NSError **)error RKL_DEPRECATED_ATTRIBUTE; 194 | 195 | - (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex; 196 | - (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex range:(NSRange)range; 197 | - (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error; 198 | 199 | - (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex; 200 | - (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex inRange:(NSRange)range; 201 | - (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error; 202 | 203 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex; 204 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex capture:(NSInteger)capture; 205 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex inRange:(NSRange)range; 206 | - (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range capture:(NSInteger)capture error:(NSError **)error; 207 | 208 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex; 209 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex capture:(NSInteger)capture; 210 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex inRange:(NSRange)range; 211 | - (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range capture:(NSInteger)capture error:(NSError **)error; 212 | 213 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement; 214 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement range:(NSRange)searchRange; 215 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement options:(RKLRegexOptions)options range:(NSRange)searchRange error:(NSError **)error; 216 | 217 | //// >= 3.0 218 | 219 | - (NSInteger)RKL_METHOD_PREPEND(captureCount); 220 | - (NSInteger)RKL_METHOD_PREPEND(captureCountWithOptions):(RKLRegexOptions)options error:(NSError **)error; 221 | 222 | - (BOOL)RKL_METHOD_PREPEND(isRegexValid); 223 | - (BOOL)RKL_METHOD_PREPEND(isRegexValidWithOptions):(RKLRegexOptions)options error:(NSError **)error; 224 | 225 | - (void)RKL_METHOD_PREPEND(flushCachedRegexData); 226 | 227 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex; 228 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex capture:(NSInteger)capture; 229 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex range:(NSRange)range; 230 | - (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range capture:(NSInteger)capture error:(NSError **)error; 231 | 232 | 233 | - (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex; 234 | - (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex range:(NSRange)range; 235 | - (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error; 236 | 237 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex; 238 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex range:(NSRange)range; 239 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error; 240 | 241 | //// >= 4.0 242 | 243 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 244 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex range:(NSRange)range withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 245 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 246 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withFirstKey:(id)firstKey arguments:(va_list)varArgsList; 247 | 248 | - (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeys:(id *)keys forCaptures:(int *)captures count:(NSUInteger)count; 249 | 250 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 251 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex range:(NSRange)range withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 252 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION; 253 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withFirstKey:(id)firstKey arguments:(va_list)varArgsList; 254 | 255 | - (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeys:(id *)keys forCaptures:(int *)captures count:(NSUInteger)count; 256 | 257 | #ifdef _RKL_BLOCKS_ENABLED 258 | 259 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsMatchedByRegex):(NSString *)regex usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 260 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 261 | 262 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsSeparatedByRegex):(NSString *)regex usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 263 | - (BOOL)RKL_METHOD_PREPEND(enumerateStringsSeparatedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 264 | 265 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 266 | - (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 267 | 268 | #endif // _RKL_BLOCKS_ENABLED 269 | 270 | @end 271 | 272 | @interface NSMutableString (RegexKitLiteAdditions) 273 | 274 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement; 275 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement range:(NSRange)searchRange; 276 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement options:(RKLRegexOptions)options range:(NSRange)searchRange error:(NSError **)error; 277 | 278 | //// >= 4.0 279 | 280 | #ifdef _RKL_BLOCKS_ENABLED 281 | 282 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 283 | - (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block; 284 | 285 | #endif // _RKL_BLOCKS_ENABLED 286 | 287 | @end 288 | 289 | #endif // __OBJC__ 290 | 291 | #endif // _REGEXKITLITE_H_ 292 | 293 | #ifdef __cplusplus 294 | } // extern "C" 295 | #endif 296 | -------------------------------------------------------------------------------- /DynamicCircle/Dynamic/View/HXDynamicTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // HXDynamicTableViewCell.m 3 | // DynamicCircle 4 | // 5 | // Created by 张炯 on 2018/7/2. 6 | // Copyright © 2018年 张炯. All rights reserved. 7 | // 8 | 9 | #import "HXDynamicTableViewCell.h" 10 | 11 | #import "HXNewExtensionCommentView.h" 12 | #import "HXDynamicCircleImageView.h" 13 | #import 14 | #import "HXLabel.h" 15 | #import "HXDynamicCircleMoreView.h" 16 | 17 | #import "HXDynamic.h" 18 | 19 | @interface HXDynamicTableViewCell () 20 | 21 | @property (nonatomic, strong) UIButton *headImageView; 22 | @property (nonatomic, strong) UIButton *nameButton; 23 | @property (nonatomic, strong) UIButton *allContentButton; 24 | @property (nonatomic, strong) UIButton *addressLabel; 25 | @property (nonatomic, strong) UILabel *timeLabel; 26 | @property (nonatomic, strong) UIButton *deleteButton; 27 | @property (nonatomic, strong) UIButton *moreButton; 28 | @property (nonatomic, strong) UIImageView *extensionTopImageView; 29 | 30 | @property (nonatomic, strong) HXLabel *contentLabel; 31 | @property (nonatomic, strong) HXDynamicCircleImageView *imageViewCircle; 32 | @property (nonatomic, strong) HXNewExtensionCommentView *extensionCommentView; 33 | 34 | @end 35 | 36 | @implementation HXDynamicTableViewCell 37 | 38 | 39 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 40 | { 41 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { 42 | [self setUpView]; 43 | } 44 | return self; 45 | } 46 | 47 | /** 48 | * 复制 49 | */ 50 | - (void)WillHideMenu:(id)sender 51 | { 52 | _contentLabel.backgroundColor = [UIColor clearColor]; 53 | _contentLabel.layer.borderColor = [UIColor clearColor].CGColor; 54 | _contentLabel.layer.borderWidth = 1; 55 | 56 | [[NSNotificationCenter defaultCenter] removeObserver:self name:UIMenuControllerWillHideMenuNotification object:nil]; 57 | } 58 | 59 | - (void)copy:(UIMenuController *)menu 60 | { 61 | [SVProgressHUD showErrorWithStatus:@"已复制到剪切板"]; 62 | 63 | _contentLabel.backgroundColor = [UIColor clearColor]; 64 | _contentLabel.layer.borderColor = [UIColor clearColor].CGColor; 65 | _contentLabel.layer.borderWidth = 1; 66 | 67 | [[NSNotificationCenter defaultCenter] removeObserver:self name:UIMenuControllerWillHideMenuNotification object:nil]; 68 | 69 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 70 | [HXTool generalPasteboard:self.model.content]; 71 | }); 72 | } 73 | 74 | 75 | //必须要有,如果要UIMenuController显示 76 | - (BOOL)canBecomeFirstResponder 77 | { 78 | return true; 79 | } 80 | 81 | //监听自己的定义事件,是 return YES; 否 return NO 即移除系统; 82 | - (BOOL)canPerformAction:(SEL)action withSender:(id)sender 83 | { 84 | if (action == @selector(copy:)) { 85 | return YES; 86 | } 87 | return NO; 88 | } 89 | 90 | /** 91 | * 初始化 92 | */ 93 | - (void)setUpView 94 | { 95 | self.selectionStyle = UITableViewCellSelectionStyleNone; 96 | self.moreButton.hidden = NO; 97 | 98 | CGFloat margar = 18; 99 | self.headImageView.sd_layout 100 | .topSpaceToView(self, margar) 101 | .leftSpaceToView(self, margar) 102 | .widthIs(40) 103 | .heightIs(40); 104 | 105 | self.nameButton.sd_layout 106 | .topSpaceToView(self, 20) 107 | .leftSpaceToView(self, 70) 108 | .heightIs(17); 109 | 110 | self.contentLabel.sd_layout 111 | .topSpaceToView(self.nameButton, 3) 112 | .leftSpaceToView(self, 70); 113 | 114 | self.allContentButton.sd_layout 115 | .topSpaceToView(self.contentLabel, 0) 116 | .leftEqualToView(self.contentLabel) 117 | .widthIs(40) 118 | .heightIs(20); 119 | 120 | self.imageViewCircle.sd_layout 121 | .leftSpaceToView(self, 70) 122 | .rightSpaceToView(self, 0); 123 | 124 | HXWeakSelf(self); 125 | [_imageViewCircle setDynamicCircleImageViewWithBlock:^(NSInteger row, NSArray *images, NSArray *imageViews, NSArray *urls, NSArray *frames) { 126 | if ([weakself.delegate respondsToSelector:@selector(dynamicCircleWithShowImageView:images:imageViews:urls:frames:)] && weakself.delegate) { 127 | [weakself.delegate dynamicCircleWithShowImageView:row images:images imageViews:imageViews urls:urls frames:frames]; 128 | } 129 | }]; 130 | 131 | self.addressLabel.sd_layout 132 | .topSpaceToView(self.imageViewCircle, 0) 133 | .leftEqualToView(self.imageViewCircle); 134 | 135 | self.timeLabel.sd_layout 136 | .topSpaceToView(self.addressLabel, 0) 137 | .leftEqualToView(self.addressLabel) 138 | .heightIs(20); 139 | 140 | self.deleteButton.sd_layout 141 | .topSpaceToView(self.timeLabel, -30) 142 | .leftSpaceToView(self.timeLabel, 5) 143 | .widthIs(50) 144 | .heightIs(40); 145 | 146 | self.moreButton.sd_layout 147 | .topEqualToView(self.deleteButton) 148 | .rightSpaceToView(self, -3) 149 | .widthIs(50) 150 | .heightIs(40); 151 | 152 | UIView *line = [[UIView alloc] init]; 153 | line.backgroundColor = BORDERToWidth_Line_Color; 154 | [self addSubview:line]; 155 | 156 | line.sd_layout 157 | .bottomSpaceToView(self, 0) 158 | .leftSpaceToView(self, 0) 159 | .rightSpaceToView(self, 0) 160 | .heightIs(0.5); 161 | 162 | CGFloat w = self.extensionTopImageView.image.size.width; 163 | 164 | self.extensionTopImageView.sd_layout 165 | .topSpaceToView(self.timeLabel, 0) 166 | .leftSpaceToView(self, 77) 167 | .widthIs(w); 168 | 169 | self.extensionCommentView.sd_layout 170 | .topSpaceToView(self.extensionTopImageView, -0.5) 171 | .leftSpaceToView(self, 70) 172 | .rightSpaceToView(self, 10) 173 | .bottomSpaceToView(line, 11); 174 | } 175 | 176 | /** 177 | * 刷新数据 178 | */ 179 | - (void)setModel:(HXDynamic *)model 180 | { 181 | _model = model; 182 | [self.headImageView sd_setImageWithURL:HXURL(model.photoUrl) 183 | forState:UIControlStateNormal 184 | placeholderImage:[UIImage imageNamed:@"icon_default_avatar"]]; 185 | 186 | [self.nameButton setTitle:model.nickname forState:(UIControlStateNormal)]; 187 | self.contentLabel.hidden = !model.content.length; 188 | if (!self.contentLabel.hidden) { 189 | self.contentLabel.userInteractionEnabled = YES; 190 | if (model.attributedText) { 191 | self.contentLabel.attributedText = model.attributedText; 192 | } 193 | } 194 | 195 | self.imageViewCircle.bpicpaths = model.bpicpath; 196 | self.imageViewCircle.spicpaths = model.spicpath; 197 | 198 | if (self.imageViewCircle.bpicpaths.count == 1 && model.width_img) { 199 | self.imageViewCircle.one_img_width = model.width_img; 200 | self.imageViewCircle.one_img_height = model.height_img; 201 | } 202 | 203 | self.timeLabel.text = model.pubdate; 204 | 205 | self.nameButton.sd_layout.widthIs(model.nicknameW); 206 | 207 | self.contentLabel.sd_layout 208 | .widthIs(model.contentSize.width) 209 | .heightIs(model.contentSize.height); 210 | 211 | self.allContentButton.hidden = model.isShowAllButton; 212 | self.allContentButton.selected = model.isShowAllAttributedText; 213 | 214 | self.extensionTopImageView.hidden = !(model.commtentTopViewH || model.praiseetrHeight); 215 | self.extensionCommentView.hidden = self.extensionTopImageView.hidden; 216 | 217 | if (!self.extensionTopImageView.hidden) { 218 | self.extensionTopImageView.sd_layout.heightIs(model.commtentTopViewH); 219 | [self.extensionCommentView setModel:model]; 220 | 221 | if (model.commtentViewH) { 222 | self.extensionCommentView.topView.bottonline.hidden = NO; 223 | } 224 | else { 225 | self.extensionCommentView.topView.bottonline.hidden = YES; 226 | } 227 | } 228 | 229 | self.addressLabel.hidden = !model.location.length; 230 | // self.deleteButton.hidden = !model.isMyDynamic; 231 | self.deleteButton.hidden = NO; 232 | 233 | UIView *temp = self.allContentButton.hidden ? _contentLabel : self.allContentButton; 234 | self.imageViewCircle.sd_layout 235 | .topSpaceToView((model.content.length ? temp : _nameButton),(!model.content.length ? 7+3 : 5)) 236 | .heightIs(model.spicpathHeight); 237 | 238 | if (!self.addressLabel.hidden) { 239 | [self.addressLabel setTitle:model.location forState:(UIControlStateNormal)]; 240 | } 241 | self.addressLabel.sd_layout 242 | .widthIs(_model.addressW) 243 | .heightIs(_model.addressH); 244 | 245 | self.timeLabel.sd_layout 246 | .widthIs(model.timeW); 247 | } 248 | 249 | /** 250 | * 交互事件 251 | */ 252 | - (void)dynamicCircleMoreViewWithRow:(NSInteger)row 253 | { 254 | if (row == 1) { 255 | 256 | if (self.delegate && [self.delegate respondsToSelector:@selector(dynamicCirclePraiseWithModel:ToTableViewCell:)]) { 257 | [self.delegate dynamicCirclePraiseWithModel:_model ToTableViewCell:self]; 258 | } 259 | } 260 | else { 261 | 262 | if (self.delegate && [self.delegate respondsToSelector:@selector(dynamicCircleCommentWithModel:didWithcommModel:toReplyuid:)]) { 263 | [self.delegate dynamicCircleCommentWithModel:_model didWithcommModel:nil toReplyuid:nil]; 264 | } 265 | } 266 | } 267 | 268 | - (void)allContentButtonWithAction:(UIButton *)sender 269 | { 270 | sender.selected = !sender.selected; 271 | 272 | [_model setattributedTextWithHeight:sender.selected]; 273 | 274 | if (self.delegate && [self.delegate respondsToSelector:@selector(reloadViewWith:)]) { 275 | [self.delegate reloadViewWith:nil]; 276 | } 277 | } 278 | 279 | - (void)headViewWithAction 280 | { 281 | if ([self.delegate respondsToSelector:@selector(dynamicCircleWithUserInfoUserid:)] && self.delegate) { 282 | [self.delegate dynamicCircleWithUserInfoUserid:_model.userinfoid]; 283 | } 284 | } 285 | 286 | - (void)deleteButtonWithAction 287 | { 288 | if ([self.delegate respondsToSelector:@selector(dynamicCircleWithDeleteDynamicID:ToTableViewCell:)] && self.delegate) { 289 | [self.delegate dynamicCircleWithDeleteDynamicID:_model.ID ToTableViewCell:self]; 290 | } 291 | } 292 | 293 | - (void)longPressAction:(UILongPressGestureRecognizer *)tap 294 | { 295 | [self becomeFirstResponder]; 296 | 297 | UIMenuController *menu = [UIMenuController sharedMenuController]; 298 | 299 | if (menu.isMenuVisible) { 300 | return; 301 | } 302 | 303 | CGRect frame = _contentLabel.bounds; 304 | frame.size.width = frame.size.width/2; 305 | 306 | [menu setTargetRect:frame inView:_contentLabel]; 307 | 308 | [menu setMenuVisible:YES animated:YES]; 309 | 310 | [[NSNotificationCenter defaultCenter] addObserver:self 311 | selector:@selector(WillHideMenu:) 312 | name:UIMenuControllerWillHideMenuNotification 313 | object:nil]; 314 | 315 | _contentLabel.backgroundColor = BORDERToWidth_8_Color; 316 | _contentLabel.layer.borderColor = BORDERToWidth_8_Color.CGColor; 317 | _contentLabel.layer.borderWidth = 1; 318 | } 319 | 320 | - (void)moreBUttonWithAction:(UIButton *)sender 321 | { 322 | HXDynamicCircleMoreView *moreView = [[HXDynamicCircleMoreView alloc] init]; 323 | [[UIApplication sharedApplication].keyWindow addSubview:moreView]; 324 | 325 | moreView.sd_layout 326 | .topSpaceToView([UIApplication sharedApplication].keyWindow, 0) 327 | .leftSpaceToView([UIApplication sharedApplication].keyWindow, 0) 328 | .rightSpaceToView([UIApplication sharedApplication].keyWindow, 0) 329 | .bottomSpaceToView([UIApplication sharedApplication].keyWindow, 0); 330 | 331 | CGPoint fromCenter = [_moreButton 332 | convertPoint:CGPointMake(_moreButton.frame.size.width * 0.1f, _moreButton.frame.size.height * 0.1f) 333 | toView:[UIApplication sharedApplication].keyWindow]; 334 | 335 | [moreView showViewFrame:fromCenter]; 336 | 337 | [moreView likeSelected:_model.praisestatus.integerValue]; 338 | 339 | HXWeakSelf(moreView); 340 | HXWeakSelf(self); 341 | [moreView setDynamicCircleMoreViewWithBlocl:^(NSInteger row) { 342 | [weakself dynamicCircleMoreViewWithRow:row]; 343 | if (row == 1) { 344 | [weakmoreView startAnimation]; 345 | } 346 | else { 347 | [weakmoreView backViewAction]; 348 | } 349 | }]; 350 | [moreView setPriseExplodeStopCallBack:^{ 351 | [weakmoreView backViewAction]; 352 | }]; 353 | } 354 | 355 | - (void)addressLabelWithAction 356 | { 357 | if ([self.delegate respondsToSelector:@selector(dynamicCircleAddressWithLocation:)] && self.delegate) { 358 | [self.delegate dynamicCircleAddressWithLocation:_model.location]; 359 | } 360 | } 361 | 362 | #pragma mark HXLabelDelegate 363 | - (void)textWithAction:(NSString *)text toType:(NSString *)type 364 | { 365 | if (![type isEqualToString:@"name"]) { 366 | NSString *newStr = text; 367 | NSError *error; 368 | NSRange stringRange = NSMakeRange(0, newStr.length); 369 | 370 | NSString *regulaStr = kRegulaURLStr; 371 | 372 | NSRegularExpression *regexps = [NSRegularExpression regularExpressionWithPattern:regulaStr options:0 error:&error]; 373 | NSArray *numbers = [regexps matchesInString:newStr options:NSMatchingReportProgress range:stringRange]; 374 | 375 | // url 376 | if (numbers.count) { 377 | if ([self.delegate respondsToSelector:@selector(dynamicCircleWebViewWithURL:)]) { 378 | [self.delegate dynamicCircleWebViewWithURL:text]; 379 | } 380 | return; 381 | } 382 | 383 | // 手机号 384 | regulaStr = kRegulaPhoneStr; 385 | regexps = [NSRegularExpression regularExpressionWithPattern:regulaStr options:0 error:&error]; 386 | numbers = [regexps matchesInString:newStr options:NSMatchingReportProgress range:stringRange]; 387 | if (numbers.count) { 388 | if ([self.delegate respondsToSelector:@selector(dynamicCircleWebViewWithPhone:)]) { 389 | [self.delegate dynamicCircleWebViewWithPhone:text]; 390 | } 391 | return; 392 | } 393 | } 394 | 395 | // 姓名 396 | NSString *userid = nil; 397 | for (HXNewDynamicCircleComment *comment in _model.commentModels) { 398 | 399 | if (comment.replynickname.length) { // 评论者 400 | 401 | if ([comment.replynickname isEqualToString:text]) { 402 | if ([comment.replynickname isEqualToString:comment.mynikename]) { 403 | userid = comment.myuserid; 404 | } 405 | else { 406 | if (comment.replyuid.length) { 407 | userid = comment.replyuid; 408 | } 409 | else { 410 | userid = comment.userinfoid; 411 | } 412 | } 413 | break; 414 | } 415 | } 416 | 417 | if (comment.nickname.length) { // 评论 418 | 419 | if ([comment.nickname isEqualToString:text]) { 420 | if ([comment.nickname isEqualToString:comment.mynikename]) { 421 | userid = comment.myuserid; 422 | } 423 | else { 424 | userid = comment.userinfoid; 425 | } 426 | break; 427 | } 428 | } 429 | } 430 | 431 | if (userid) { 432 | if ([self.delegate respondsToSelector:@selector(dynamicCircleWithUserInfoUserid:)] && self.delegate) { 433 | [self.delegate dynamicCircleWithUserInfoUserid:userid]; 434 | } 435 | } 436 | } 437 | 438 | - (void)newExtensionCommentViewtextWithUserId:(NSString *)text 439 | { 440 | if ([self.delegate respondsToSelector:@selector(dynamicCircleWithUserInfoUserid:)] && self.delegate) { 441 | [self.delegate dynamicCircleWithUserInfoUserid:text]; 442 | } 443 | } 444 | 445 | #pragma mark HXNewExtensionCommentViewDelegate 446 | - (void)newExtensionCommentViewtextWithAction:(NSString *)text toType:(NSString *)type 447 | { 448 | [self textWithAction:text toType:type]; 449 | } 450 | 451 | - (void)newExtensionCommentViewDidSelectRowAtModel:(HXNewDynamicCircleComment *)model 452 | { 453 | if (self.delegate && [self.delegate respondsToSelector:@selector(dynamicCircleCommentWithModel:didWithcommModel:toReplyuid:)]) { 454 | [self.delegate dynamicCircleCommentWithModel:_model didWithcommModel:model toReplyuid:nil]; 455 | } 456 | } 457 | 458 | #pragma mark - Getter 459 | - (UIButton *)headImageView 460 | { 461 | if (!_headImageView) { 462 | _headImageView = [UIButton buttonWithType:(UIButtonTypeCustom)]; 463 | [_headImageView addTarget:self action:@selector(headViewWithAction) forControlEvents:(UIControlEventTouchUpInside)]; 464 | _headImageView.imageView.contentMode = UIViewContentModeScaleAspectFill; 465 | [self addSubview:_headImageView]; 466 | } 467 | return _headImageView; 468 | } 469 | 470 | - (UIButton *)nameButton 471 | { 472 | if (!_nameButton) { 473 | _nameButton = [UIButton buttonWithType:(UIButtonTypeCustom)]; 474 | [_nameButton setTitleColor:[UIColor colorWithHex:0x046363] forState:UIControlStateNormal]; 475 | _nameButton.titleLabel.font = [UIFont boldSystemFontOfSize:14]; 476 | [_nameButton addTarget:self action:@selector(headViewWithAction) forControlEvents:(UIControlEventTouchUpInside)]; 477 | [self addSubview:_nameButton]; 478 | } 479 | return _nameButton; 480 | } 481 | 482 | - (HXLabel *)contentLabel 483 | { 484 | if (!_contentLabel) { 485 | _contentLabel = [[HXLabel alloc] init]; 486 | _contentLabel.font = [UIFont systemFontOfSize:16]; 487 | _contentLabel.dataDelegate = self; 488 | [self addSubview:_contentLabel]; 489 | 490 | _contentLabel.layer.cornerRadius = 4; 491 | _contentLabel.layer.masksToBounds = YES; 492 | 493 | UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressAction:)]; 494 | [_contentLabel addGestureRecognizer:longPress]; 495 | } 496 | return _contentLabel; 497 | } 498 | 499 | - (HXDynamicCircleImageView *)imageViewCircle 500 | { 501 | if (!_imageViewCircle) { 502 | _imageViewCircle = [[HXDynamicCircleImageView alloc] init]; 503 | [self addSubview:_imageViewCircle]; 504 | } 505 | return _imageViewCircle; 506 | } 507 | 508 | - (UIButton *)allContentButton 509 | { 510 | if (!_allContentButton) { 511 | _allContentButton = [UIButton buttonWithType:(UIButtonTypeCustom)]; 512 | [_allContentButton setTitleColor:[UIColor colorWithHex:0x046363] forState:UIControlStateNormal]; 513 | _allContentButton.titleLabel.font = [UIFont systemFontOfSize:13]; 514 | [_allContentButton setTitle:@"全文" forState:(UIControlStateNormal)]; 515 | [_allContentButton setTitle:@"收起" forState:(UIControlStateSelected)]; 516 | _allContentButton.titleEdgeInsets = UIEdgeInsetsMake(-1, -6, 1, 6); 517 | [_allContentButton addTarget:self action:@selector(allContentButtonWithAction:) forControlEvents:(UIControlEventTouchUpInside)]; 518 | [self addSubview:_allContentButton]; 519 | } 520 | return _allContentButton; 521 | } 522 | 523 | - (UIButton *)addressLabel 524 | { 525 | if (!_addressLabel) { 526 | _addressLabel = [UIButton buttonWithType:(UIButtonTypeCustom)]; 527 | _addressLabel.titleLabel.font = [UIFont systemFontOfSize:13]; 528 | [_addressLabel setTitleColor:[UIColor colorWithHex:0x046363] forState:(UIControlStateNormal)]; 529 | [self addSubview:_addressLabel]; 530 | [_addressLabel addTarget:self action:@selector(addressLabelWithAction) forControlEvents:(UIControlEventTouchUpInside)]; 531 | } 532 | return _addressLabel; 533 | } 534 | 535 | - (UILabel *)timeLabel 536 | { 537 | if (!_timeLabel) { 538 | _timeLabel = [[UILabel alloc] init]; 539 | _timeLabel.font = [UIFont systemFontOfSize:13]; 540 | _timeLabel.textColor = BORDER_TextGrey1_Color; 541 | [self addSubview:_timeLabel]; 542 | } 543 | return _timeLabel; 544 | } 545 | 546 | - (UIButton *)deleteButton 547 | { 548 | if (!_deleteButton) { 549 | _deleteButton = [UIButton buttonWithType:(UIButtonTypeCustom)]; 550 | [_deleteButton setTitle:@"删除" forState:UIControlStateNormal]; 551 | _deleteButton.titleLabel.font = [UIFont systemFontOfSize:13]; 552 | [_deleteButton addTarget:self action:@selector(deleteButtonWithAction) forControlEvents:(UIControlEventTouchUpInside)]; 553 | [_deleteButton setTitleColor:[UIColor colorWithHex:0x046363] forState:UIControlStateNormal]; 554 | [self addSubview:_deleteButton]; 555 | } 556 | return _deleteButton; 557 | } 558 | 559 | - (UIImageView *)extensionTopImageView 560 | { 561 | if (!_extensionCommentView) { 562 | _extensionTopImageView = [[UIImageView alloc] init]; 563 | _extensionTopImageView.image = [UIImage imageNamed:@"icon_circle_triangle"]; 564 | [self addSubview:_extensionTopImageView]; 565 | } 566 | return _extensionTopImageView; 567 | } 568 | 569 | - (HXNewExtensionCommentView *)extensionCommentView 570 | { 571 | if (!_extensionCommentView) { 572 | _extensionCommentView = [[HXNewExtensionCommentView alloc] init]; 573 | _extensionCommentView.delegate = self; 574 | _extensionCommentView.backgroundColor = BORDERToWidth_8_Color; 575 | _extensionCommentView.layer.cornerRadius = 3; 576 | _extensionCommentView.layer.masksToBounds = YES; 577 | [self addSubview:_extensionCommentView]; 578 | } 579 | return _extensionCommentView; 580 | } 581 | 582 | - (UIButton *)moreButton 583 | { 584 | if (!_moreButton) { 585 | _moreButton = [UIButton buttonWithType:(UIButtonTypeCustom)]; 586 | _moreButton.backgroundColor = [UIColor whiteColor]; 587 | [_moreButton setImage:[UIImage imageNamed:@"icon_circle_open"] forState:(UIControlStateNormal)]; 588 | [_moreButton addTarget:self action:@selector(moreBUttonWithAction:) forControlEvents:(UIControlEventTouchUpInside)]; 589 | [self addSubview:_moreButton]; 590 | } 591 | return _moreButton; 592 | } 593 | 594 | @end 595 | --------------------------------------------------------------------------------