diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index 3a39296e..8957a2ea 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -36,9 +36,8 @@ 186A534C26FC6ED900D67B2C /* TTAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 186A533C26FC6ED900D67B2C /* TTAlertView.m */; }; 186A534D26FC6ED900D67B2C /* TTActionSheetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 186A533F26FC6ED900D67B2C /* TTActionSheetView.m */; }; 186A534E26FC6ED900D67B2C /* TTPopupService.m in Sources */ = {isa = PBXBuildFile; fileRef = 186A534126FC6ED900D67B2C /* TTPopupService.m */; }; - 186A536926FC6F2E00D67B2C /* XCShareView.m in Sources */ = {isa = PBXBuildFile; fileRef = 186A536126FC6F2E00D67B2C /* XCShareView.m */; }; - 186A536A26FC6F2E00D67B2C /* XCShareItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 186A536426FC6F2E00D67B2C /* XCShareItem.m */; }; - 186A536B26FC6F2E00D67B2C /* XCShareItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 186A536726FC6F2E00D67B2C /* XCShareItemCell.m */; }; + 186A536926FC6F2E00D67B2C /* XPShareView.m in Sources */ = {isa = PBXBuildFile; fileRef = 186A536126FC6F2E00D67B2C /* XPShareView.m */; }; + 186A536B26FC6F2E00D67B2C /* XPShareItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 186A536726FC6F2E00D67B2C /* XPShareItemCell.m */; }; 187EEEDC26E89B32002833B2 /* BaseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 187EEEDB26E89B32002833B2 /* BaseModel.m */; }; 187EEEE126E89BFB002833B2 /* AccountModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 187EEEE026E89BFB002833B2 /* AccountModel.m */; }; 187EEEF026E89FE8002833B2 /* AccountInfoStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 187EEEEE26E89FE8002833B2 /* AccountInfoStorage.m */; }; @@ -132,6 +131,8 @@ E81D58822720082A003063FE /* MicroWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = E81D58812720082A003063FE /* MicroWaveView.m */; }; E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E82109AC26F1C8A000FC3319 /* CountDownHelper.m */; }; E82109B026F1D83500FC3319 /* LoginBindPhonePresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E82109AF26F1D83500FC3319 /* LoginBindPhonePresent.m */; }; + E82325E6274CCAFA003A3332 /* XPShareInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325E5274CCAFA003A3332 /* XPShareInfoModel.m */; }; + E82325E9274CE56A003A3332 /* XPShareItem.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325E8274CE56A003A3332 /* XPShareItem.m */; }; E824543526F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */; }; E824543826F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543726F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m */; }; E824543A26F5880E00BE8163 /* XPLoginVerifBindPhoneProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E824543926F5822800BE8163 /* XPLoginVerifBindPhoneProtocol.h */; }; @@ -356,12 +357,10 @@ 186A534226FC6ED900D67B2C /* TTPopupServiceProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTPopupServiceProtocol.h; sourceTree = ""; }; 186A534326FC6ED900D67B2C /* TTPopupService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTPopupService.h; sourceTree = ""; }; 186A534526FC6ED900D67B2C /* TTPopupConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTPopupConstants.h; sourceTree = ""; }; - 186A536126FC6F2E00D67B2C /* XCShareView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCShareView.m; sourceTree = ""; }; - 186A536226FC6F2E00D67B2C /* XCShareView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCShareView.h; sourceTree = ""; }; - 186A536426FC6F2E00D67B2C /* XCShareItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCShareItem.m; sourceTree = ""; }; - 186A536526FC6F2E00D67B2C /* XCShareItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCShareItem.h; sourceTree = ""; }; - 186A536726FC6F2E00D67B2C /* XCShareItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCShareItemCell.m; sourceTree = ""; }; - 186A536826FC6F2E00D67B2C /* XCShareItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCShareItemCell.h; sourceTree = ""; }; + 186A536126FC6F2E00D67B2C /* XPShareView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPShareView.m; sourceTree = ""; }; + 186A536226FC6F2E00D67B2C /* XPShareView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPShareView.h; sourceTree = ""; }; + 186A536726FC6F2E00D67B2C /* XPShareItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPShareItemCell.m; sourceTree = ""; }; + 186A536826FC6F2E00D67B2C /* XPShareItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPShareItemCell.h; sourceTree = ""; }; 186F8B472733F2AE007A17BC /* MicroQueueProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroQueueProtocol.h; sourceTree = ""; }; 187EEEDA26E89B32002833B2 /* BaseModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseModel.h; sourceTree = ""; }; 187EEEDB26E89B32002833B2 /* BaseModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseModel.m; sourceTree = ""; }; @@ -529,6 +528,10 @@ E82109AC26F1C8A000FC3319 /* CountDownHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CountDownHelper.m; sourceTree = ""; }; E82109AE26F1D83500FC3319 /* LoginBindPhonePresent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginBindPhonePresent.h; sourceTree = ""; }; E82109AF26F1D83500FC3319 /* LoginBindPhonePresent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginBindPhonePresent.m; sourceTree = ""; }; + E82325E4274CCAFA003A3332 /* XPShareInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPShareInfoModel.h; sourceTree = ""; }; + E82325E5274CCAFA003A3332 /* XPShareInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPShareInfoModel.m; sourceTree = ""; }; + E82325E7274CE56A003A3332 /* XPShareItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPShareItem.h; sourceTree = ""; }; + E82325E8274CE56A003A3332 /* XPShareItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPShareItem.m; sourceTree = ""; }; E824543326F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhoneViewController.h; sourceTree = ""; }; E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginVerifBindPhoneViewController.m; sourceTree = ""; }; E824543626F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhonePresenter.h; sourceTree = ""; }; @@ -970,8 +973,8 @@ 186A536026FC6F2E00D67B2C /* ShareView */ = { isa = PBXGroup; children = ( - 186A536226FC6F2E00D67B2C /* XCShareView.h */, - 186A536126FC6F2E00D67B2C /* XCShareView.m */, + 186A536226FC6F2E00D67B2C /* XPShareView.h */, + 186A536126FC6F2E00D67B2C /* XPShareView.m */, 186A536326FC6F2E00D67B2C /* Model */, 186A536626FC6F2E00D67B2C /* View */, ); @@ -981,8 +984,10 @@ 186A536326FC6F2E00D67B2C /* Model */ = { isa = PBXGroup; children = ( - 186A536526FC6F2E00D67B2C /* XCShareItem.h */, - 186A536426FC6F2E00D67B2C /* XCShareItem.m */, + E82325E4274CCAFA003A3332 /* XPShareInfoModel.h */, + E82325E5274CCAFA003A3332 /* XPShareInfoModel.m */, + E82325E7274CE56A003A3332 /* XPShareItem.h */, + E82325E8274CE56A003A3332 /* XPShareItem.m */, ); path = Model; sourceTree = ""; @@ -990,8 +995,8 @@ 186A536626FC6F2E00D67B2C /* View */ = { isa = PBXGroup; children = ( - 186A536826FC6F2E00D67B2C /* XCShareItemCell.h */, - 186A536726FC6F2E00D67B2C /* XCShareItemCell.m */, + 186A536826FC6F2E00D67B2C /* XPShareItemCell.h */, + 186A536726FC6F2E00D67B2C /* XPShareItemCell.m */, ); path = View; sourceTree = ""; @@ -2413,6 +2418,7 @@ 189DD53426DE255300AB55B1 /* TabbarViewController.m in Sources */, 18EE401A2754BA9F00A452BF /* NIMMessageMaker.m in Sources */, E8EEB91D26FC9D58007C6EBA /* XPMineUserInfoDateView.m in Sources */, + E82325E9274CE56A003A3332 /* XPShareItem.m in Sources */, E890BC0D273D09A50007C46B /* XPGiftCountView.m in Sources */, E8AC722F26F49610007D6E91 /* XPMineNotificationItemModel.m in Sources */, E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */, @@ -2425,6 +2431,7 @@ 187EEEFE26E8A82C002833B2 /* NSObject+AutoCoding.m in Sources */, E884C36F2743AAC800E1EBED /* AttachmentModel.m in Sources */, E8AC721926F46E0B007D6E91 /* XPMineSettingItemModel.m in Sources */, + E82325E6274CCAFA003A3332 /* XPShareInfoModel.m in Sources */, 189DD55A26DE39D200AB55B1 /* BaseMvpPresenter.m in Sources */, 180806D827293794001FD836 /* NSObject+MJExtension.m in Sources */, 189DD6FF26E20E5900AB55B1 /* HttpRequestHelper.m in Sources */, @@ -2458,7 +2465,6 @@ 9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */, E8EEB8F426FC2050007C6EBA /* SDBrowserImageView.m in Sources */, E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */, - 186A536A26FC6F2E00D67B2C /* XCShareItem.m in Sources */, 189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */, E8B846C226FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m in Sources */, E8EEB91726FC7B35007C6EBA /* XPMineUserInfoDesViewController.m in Sources */, @@ -2529,14 +2535,14 @@ E89DA67527009ACD008483C1 /* XPMineRechargeNavView.m in Sources */, 1808072D2731598F001FD836 /* XPNetImageYYLabel.m in Sources */, 18486213271EA9DA005FC5DC /* RtcManager.m in Sources */, - 186A536926FC6F2E00D67B2C /* XCShareView.m in Sources */, + 186A536926FC6F2E00D67B2C /* XPShareView.m in Sources */, 186A534C26FC6ED900D67B2C /* TTAlertView.m in Sources */, E8B825BF26E9E57D009E8E9F /* LoginTicketInfo.m in Sources */, E8E7DAE82744F5EF00C631CC /* XPGiftStorage.m in Sources */, E878894C273A607C00BF1D57 /* XPGiftUserCollectionViewCell.m in Sources */, 181D7F212727D9DB00B7C059 /* SocialStageView.m in Sources */, 187EEEF026E89FE8002833B2 /* AccountInfoStorage.m in Sources */, - 186A536B26FC6F2E00D67B2C /* XCShareItemCell.m in Sources */, + 186A536B26FC6F2E00D67B2C /* XPShareItemCell.m in Sources */, E8B846C526FDB41A00A777FE /* XPMineUserInfolbumPresenter.m in Sources */, E83DB47D2746372300D8CBD1 /* XPRoomGiftBannerView.m in Sources */, E872309326E8D31500B90D4F /* LoginVerifCodeView.m in Sources */, diff --git a/xplan-ios/Assets.xcassets/Share/Contents.json b/xplan-ios/Assets.xcassets/Share/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Share/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Share/share_qq_disable.imageset/Contents.json b/xplan-ios/Assets.xcassets/Share/share_qq_disable.imageset/Contents.json new file mode 100644 index 00000000..2659d872 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Share/share_qq_disable.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "share_qq_disable@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "share_qq_disable@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Share/share_qq_disable.imageset/share_qq_disable@2x.png b/xplan-ios/Assets.xcassets/Share/share_qq_disable.imageset/share_qq_disable@2x.png new file mode 100644 index 00000000..83b59e69 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_qq_disable.imageset/share_qq_disable@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_qq_disable.imageset/share_qq_disable@3x.png b/xplan-ios/Assets.xcassets/Share/share_qq_disable.imageset/share_qq_disable@3x.png new file mode 100644 index 00000000..b4991dd5 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_qq_disable.imageset/share_qq_disable@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_qq_normal.imageset/Contents.json b/xplan-ios/Assets.xcassets/Share/share_qq_normal.imageset/Contents.json new file mode 100644 index 00000000..2919bc10 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Share/share_qq_normal.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "share_qq_normal@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "share_qq_normal@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Share/share_qq_normal.imageset/share_qq_normal@2x.png b/xplan-ios/Assets.xcassets/Share/share_qq_normal.imageset/share_qq_normal@2x.png new file mode 100644 index 00000000..fc9394ed Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_qq_normal.imageset/share_qq_normal@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_qq_normal.imageset/share_qq_normal@3x.png b/xplan-ios/Assets.xcassets/Share/share_qq_normal.imageset/share_qq_normal@3x.png new file mode 100644 index 00000000..d4eb3cb6 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_qq_normal.imageset/share_qq_normal@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_qqzone_disable.imageset/Contents.json b/xplan-ios/Assets.xcassets/Share/share_qqzone_disable.imageset/Contents.json new file mode 100644 index 00000000..fb035cb1 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Share/share_qqzone_disable.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "share_qqzone_disable@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "share_qqzone_disable@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Share/share_qqzone_disable.imageset/share_qqzone_disable@2x.png b/xplan-ios/Assets.xcassets/Share/share_qqzone_disable.imageset/share_qqzone_disable@2x.png new file mode 100644 index 00000000..755e9eaf Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_qqzone_disable.imageset/share_qqzone_disable@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_qqzone_disable.imageset/share_qqzone_disable@3x.png b/xplan-ios/Assets.xcassets/Share/share_qqzone_disable.imageset/share_qqzone_disable@3x.png new file mode 100644 index 00000000..e656d8a3 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_qqzone_disable.imageset/share_qqzone_disable@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_qqzone_normal.imageset/Contents.json b/xplan-ios/Assets.xcassets/Share/share_qqzone_normal.imageset/Contents.json new file mode 100644 index 00000000..30b22b77 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Share/share_qqzone_normal.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "share_qqzone_normal@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "share_qqzone_normal@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Share/share_qqzone_normal.imageset/share_qqzone_normal@2x.png b/xplan-ios/Assets.xcassets/Share/share_qqzone_normal.imageset/share_qqzone_normal@2x.png new file mode 100644 index 00000000..b4d7e0af Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_qqzone_normal.imageset/share_qqzone_normal@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_qqzone_normal.imageset/share_qqzone_normal@3x.png b/xplan-ios/Assets.xcassets/Share/share_qqzone_normal.imageset/share_qqzone_normal@3x.png new file mode 100644 index 00000000..a62c643d Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_qqzone_normal.imageset/share_qqzone_normal@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_circle_disable.imageset/Contents.json b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_disable.imageset/Contents.json new file mode 100644 index 00000000..0ca0d4d5 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_disable.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "share_wechat_circle_disable@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "share_wechat_circle_disable@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_circle_disable.imageset/share_wechat_circle_disable@2x.png b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_disable.imageset/share_wechat_circle_disable@2x.png new file mode 100644 index 00000000..de6ffe40 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_disable.imageset/share_wechat_circle_disable@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_circle_disable.imageset/share_wechat_circle_disable@3x.png b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_disable.imageset/share_wechat_circle_disable@3x.png new file mode 100644 index 00000000..ed4401f9 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_disable.imageset/share_wechat_circle_disable@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_circle_normal.imageset/Contents.json b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_normal.imageset/Contents.json new file mode 100644 index 00000000..6b33697b --- /dev/null +++ b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_normal.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "share_wechat_circle_normal@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "share_wechat_circle_normal@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_circle_normal.imageset/share_wechat_circle_normal@2x.png b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_normal.imageset/share_wechat_circle_normal@2x.png new file mode 100644 index 00000000..c5a7c14b Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_normal.imageset/share_wechat_circle_normal@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_circle_normal.imageset/share_wechat_circle_normal@3x.png b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_normal.imageset/share_wechat_circle_normal@3x.png new file mode 100644 index 00000000..b6501378 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_wechat_circle_normal.imageset/share_wechat_circle_normal@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_disable.imageset/Contents.json b/xplan-ios/Assets.xcassets/Share/share_wechat_disable.imageset/Contents.json new file mode 100644 index 00000000..0d612c16 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Share/share_wechat_disable.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "share_wechat_disable@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "share_wechat_disable@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_disable.imageset/share_wechat_disable@2x.png b/xplan-ios/Assets.xcassets/Share/share_wechat_disable.imageset/share_wechat_disable@2x.png new file mode 100644 index 00000000..181112da Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_wechat_disable.imageset/share_wechat_disable@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_disable.imageset/share_wechat_disable@3x.png b/xplan-ios/Assets.xcassets/Share/share_wechat_disable.imageset/share_wechat_disable@3x.png new file mode 100644 index 00000000..ff8d38da Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_wechat_disable.imageset/share_wechat_disable@3x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_normal.imageset/Contents.json b/xplan-ios/Assets.xcassets/Share/share_wechat_normal.imageset/Contents.json new file mode 100644 index 00000000..e0558b38 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Share/share_wechat_normal.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "share_wechat_normal@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "share_wechat_normal@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_normal.imageset/share_wechat_normal@2x.png b/xplan-ios/Assets.xcassets/Share/share_wechat_normal.imageset/share_wechat_normal@2x.png new file mode 100644 index 00000000..9ceb0966 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_wechat_normal.imageset/share_wechat_normal@2x.png differ diff --git a/xplan-ios/Assets.xcassets/Share/share_wechat_normal.imageset/share_wechat_normal@3x.png b/xplan-ios/Assets.xcassets/Share/share_wechat_normal.imageset/share_wechat_normal@3x.png new file mode 100644 index 00000000..8ab4b610 Binary files /dev/null and b/xplan-ios/Assets.xcassets/Share/share_wechat_normal.imageset/share_wechat_normal@3x.png differ diff --git a/xplan-ios/Base/UI/ShareView/Model/XCShareItem.h b/xplan-ios/Base/UI/ShareView/Model/XCShareItem.h deleted file mode 100644 index e12d13d8..00000000 --- a/xplan-ios/Base/UI/ShareView/Model/XCShareItem.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// XCShareItem.h -// XCRoomMoudle -// -// Created by KevinWang on 2018/9/2. -// Copyright © 2018年 YiZhuan. All rights reserved. -// - -#import - -typedef enum : NSUInteger { - XCShareItemTagReport, //举报 - XCShareItemTagAppFriends, //应用好友 - XCShareItemTagWeChat, //微信好友 - XCShareItemTagMoments, //微信朋友圈 - XCShareItemTagQQ, //QQ好友 - XCShareItemTagQQZone, //QQ空间 - XCShareItemTagWeibo, //新浪微博 - XCShareItemTagDelete,//删除 - XCShareItemTagCopyright,//版权 - XCShare_Platfrom_Type_FaceBook, //FaceBook -} XCShareItemTag; - -@interface XCShareItem : NSObject - -@property (nonatomic, copy) NSString *title; -@property (nonatomic, copy) NSString *imageName; -@property (nonatomic, copy) NSString *disableImageName; -@property (nonatomic, assign) BOOL disable; -@property (nonatomic, assign) XCShareItemTag itemTag; - -+ (instancetype)itemWitTag:(XCShareItemTag)itemTag title:(NSString *)title imageName:(NSString *)imageName disableImageName:(NSString *)disableImageName disable:(BOOL)disable; - -@end diff --git a/xplan-ios/Base/UI/ShareView/Model/XCShareItem.m b/xplan-ios/Base/UI/ShareView/Model/XCShareItem.m deleted file mode 100644 index 1c853a78..00000000 --- a/xplan-ios/Base/UI/ShareView/Model/XCShareItem.m +++ /dev/null @@ -1,23 +0,0 @@ -// -// XCShareItem.m -// XCRoomMoudle -// -// Created by KevinWang on 2018/9/2. -// Copyright © 2018年 YiZhuan. All rights reserved. -// - -#import "XCShareItem.h" - -@implementation XCShareItem - -+ (instancetype)itemWitTag:(XCShareItemTag)itemTag title:(NSString *)title imageName:(NSString *)imageName disableImageName:(NSString *)disableImageName disable:(BOOL)disable{ - XCShareItem *item = [[self alloc] init]; - item.itemTag = itemTag; - item.title = title; - item.imageName = imageName; - item.disableImageName = disableImageName; - item.disable = disable; - return item; -} - -@end diff --git a/xplan-ios/Base/UI/ShareView/Model/XPShareInfoModel.h b/xplan-ios/Base/UI/ShareView/Model/XPShareInfoModel.h new file mode 100644 index 00000000..ca3a2756 --- /dev/null +++ b/xplan-ios/Base/UI/ShareView/Model/XPShareInfoModel.h @@ -0,0 +1,34 @@ +// +// XPShareModel.h +// xplan-ios +// +// Created by 冯硕 on 2021/11/23. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +typedef NS_ENUM(NSUInteger, ShareType) { + ///分享房间 + ShareType_Room, + ///分享h5 + ShareType_H5, +}; + +@interface XPShareInfoModel : NSObject +///分享的标题 +@property (nonatomic,copy) NSString *shareTitle; +///分享的内容 +@property (nonatomic,copy) NSString *shareContent; +///分享的地址 +@property (nonatomic,copy) NSString *shareUrl; +///分享图片 +@property (nonatomic,copy) NSString *shareImageUrl; +///分享图片 +@property (nonatomic,copy) UIImage *shareImage; +///分享的类型 +@property (nonatomic,assign) ShareType type; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Base/UI/ShareView/Model/XPShareInfoModel.m b/xplan-ios/Base/UI/ShareView/Model/XPShareInfoModel.m new file mode 100644 index 00000000..fa2b5240 --- /dev/null +++ b/xplan-ios/Base/UI/ShareView/Model/XPShareInfoModel.m @@ -0,0 +1,12 @@ +// +// XPShareModel.m +// xplan-ios +// +// Created by 冯硕 on 2021/11/23. +// + +#import "XPShareInfoModel.h" + +@implementation XPShareInfoModel + +@end diff --git a/xplan-ios/Base/UI/ShareView/Model/XPShareItem.h b/xplan-ios/Base/UI/ShareView/Model/XPShareItem.h new file mode 100644 index 00000000..49e701a2 --- /dev/null +++ b/xplan-ios/Base/UI/ShareView/Model/XPShareItem.h @@ -0,0 +1,30 @@ +// +// XPShareItem.h +// xplan-ios +// +// Created by 冯硕 on 2021/11/23. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef enum : NSUInteger { + XPShareItemTagAppFriends, //应用好友 + XPShareItemTagWeChat, //微信好友 + XPShareItemTagMoments, //微信朋友圈 + XPShareItemTagQQ, //QQ好友 + XPShareItemTagQQZone, //QQ空间 +} XPShareItemTag; + +@interface XPShareItem : NSObject +@property (nonatomic, copy) NSString *title; +@property (nonatomic, copy) NSString *imageName; +@property (nonatomic, copy) NSString *disableImageName; +@property (nonatomic, assign) BOOL disable; +@property (nonatomic, assign) XPShareItemTag type; + ++ (instancetype)itemWitTag:(XPShareItemTag)itemTag title:(NSString *)title imageName:(NSString *)imageName disableImageName:(NSString *)disableImageName; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Base/UI/ShareView/Model/XPShareItem.m b/xplan-ios/Base/UI/ShareView/Model/XPShareItem.m new file mode 100644 index 00000000..4d7ba179 --- /dev/null +++ b/xplan-ios/Base/UI/ShareView/Model/XPShareItem.m @@ -0,0 +1,23 @@ +// +// XPShareItem.m +// xplan-ios +// +// Created by 冯硕 on 2021/11/23. +// + +#import "XPShareItem.h" + +@implementation XPShareItem + ++ (instancetype)itemWitTag:(XPShareItemTag)itemTag title:(NSString *)title imageName:(NSString *)imageName disableImageName:(NSString *)disableImageName { + XPShareItem *item = [[self alloc] init]; + item.type = itemTag; + item.title = title; + item.imageName = imageName; + item.disableImageName = disableImageName; + item.disable = NO; + return item; +} + + +@end diff --git a/xplan-ios/Base/UI/ShareView/View/XCShareItemCell.h b/xplan-ios/Base/UI/ShareView/View/XPShareItemCell.h similarity index 54% rename from xplan-ios/Base/UI/ShareView/View/XCShareItemCell.h rename to xplan-ios/Base/UI/ShareView/View/XPShareItemCell.h index e9128a4c..e38aa6bb 100644 --- a/xplan-ios/Base/UI/ShareView/View/XCShareItemCell.h +++ b/xplan-ios/Base/UI/ShareView/View/XPShareItemCell.h @@ -7,10 +7,10 @@ // #import -#import "XCShareItem.h" +#import "XPShareItem.h" -@interface XCShareItemCell : UICollectionViewCell +@interface XPShareItemCell : UICollectionViewCell -@property (nonatomic, strong) XCShareItem *shareItem; +@property (nonatomic, strong) XPShareItem *shareItem; @end diff --git a/xplan-ios/Base/UI/ShareView/View/XCShareItemCell.m b/xplan-ios/Base/UI/ShareView/View/XPShareItemCell.m similarity index 55% rename from xplan-ios/Base/UI/ShareView/View/XCShareItemCell.m rename to xplan-ios/Base/UI/ShareView/View/XPShareItemCell.m index 48008d36..de9591d6 100644 --- a/xplan-ios/Base/UI/ShareView/View/XCShareItemCell.m +++ b/xplan-ios/Base/UI/ShareView/View/XPShareItemCell.m @@ -6,54 +6,38 @@ // Copyright © 2018年 YiZhuan. All rights reserved. // -#import "XCShareItemCell.h" +#import "XPShareItemCell.h" #import "ThemeColor.h" #import -@interface XCShareItemCell() +@interface XPShareItemCell() @property (nonatomic, strong) UIImageView *iconImageView; @property (nonatomic, strong) UILabel *titleLabel; @end -@implementation XCShareItemCell +@implementation XPShareItemCell #pragma mark - Life Style - (instancetype)initWithFrame:(CGRect)frame{ if (self=[super initWithFrame:frame]) { - [self setupSubviews]; - [self setupSubviewsConstraints]; + [self initSubViews]; + [self initSubViewConstraints]; } return self; } - -#pragma mark - puble method -- (void)setShareItem:(XCShareItem *)shareItem{ - _shareItem = shareItem; - self.userInteractionEnabled = !shareItem.disable; - if (shareItem.disable) { - self.iconImageView.image = [UIImage imageNamed:shareItem.disableImageName]; - }else{ - self.iconImageView.image = [UIImage imageNamed:shareItem.imageName]; - } - self.titleLabel.text = shareItem.title; - - -} - -#pragma mark - Private -- (void)setupSubviews{ +#pragma mark - Private Method +- (void)initSubViews{ [self.contentView addSubview:self.iconImageView]; [self.contentView addSubview:self.titleLabel]; } -- (void)setupSubviewsConstraints{ - CGFloat wh = 30; - +- (void)initSubViewConstraints{ + CGFloat wh = 40; [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.width.height.equalTo(@(wh)); - make.bottom.equalTo(self.contentView.mas_centerY); + make.top.equalTo(self.contentView); make.centerX.equalTo(self.contentView); }]; [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { @@ -62,7 +46,19 @@ }]; } -#pragma mark - Getter +#pragma mark - Getters And Setters +- (void)setShareItem:(XPShareItem *)shareItem{ + _shareItem = shareItem; + self.userInteractionEnabled = shareItem.disable; + if (!shareItem.disable) { + self.iconImageView.image = [UIImage imageNamed:shareItem.disableImageName]; + }else{ + self.iconImageView.image = [UIImage imageNamed:shareItem.imageName]; + } + self.titleLabel.text = shareItem.title; +} + + - (UIImageView *)iconImageView{ if (!_iconImageView) { _iconImageView = [[UIImageView alloc] init]; @@ -72,8 +68,9 @@ - (UILabel *)titleLabel{ if (!_titleLabel) { _titleLabel = [[UILabel alloc] init]; - _titleLabel.textColor = [ThemeColor mainTextColor]; - _titleLabel.font = [UIFont systemFontOfSize:10.0]; + _titleLabel.textColor = [ThemeColor alertMessageColor]; + _titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:12]; + _titleLabel.textAlignment = NSTextAlignmentCenter; } return _titleLabel; } diff --git a/xplan-ios/Base/UI/ShareView/XCShareView.h b/xplan-ios/Base/UI/ShareView/XCShareView.h deleted file mode 100644 index 66cebf7c..00000000 --- a/xplan-ios/Base/UI/ShareView/XCShareView.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// XCShareView.h -// XCRoomMoudle -// -// Created by KevinWang on 2018/9/2. -// Copyright © 2018年 YiZhuan. All rights reserved. -// - -#import -#import "XCShareItem.h" - -typedef enum : NSUInteger { - XCShareViewStyleCenter, - XCShareViewStyleCenterAndBottom, - XCShareViewStyleAll, -} XCShareViewStyle; - -@class XCShareView; -@protocol XCShareViewDelegate - -- (void)shareView:(XCShareView *)shareView didSelected:(XCShareItemTag)itemTag; -- (void)shareViewDidClickCancle:(XCShareView *)shareView; - -@end; - -@interface XCShareView : UIView - -@property (nonatomic, weak) id delegate; - -- (instancetype)initWithItemSize:(CGSize)itemSize items:(NSArray *)items margin:(CGFloat)margin; -/** - 初始化XCShareView - - @param itemSize 每个分享item的大小 - @param items 分享的item数据源 - @param edgeInsets 分享item距离容器的上下左右间距 - @return XCShareView - */ -- (instancetype)initWithShareViewStyle:(XCShareViewStyle)style items:(NSArray *)items itemSize:(CGSize)itemSize edgeInsets:(UIEdgeInsets)edgeInsets ; - -@end diff --git a/xplan-ios/Base/UI/ShareView/XCShareView.m b/xplan-ios/Base/UI/ShareView/XCShareView.m deleted file mode 100644 index 90a17d62..00000000 --- a/xplan-ios/Base/UI/ShareView/XCShareView.m +++ /dev/null @@ -1,204 +0,0 @@ -// -// XCShareView.m -// XCRoomMoudle -// -// Created by KevinWang on 2018/9/2. -// Copyright © 2018年 YiZhuan. All rights reserved. -// - -#import "XCShareView.h" -#import "XCShareItemCell.h" -#import "XPMacro.h" -#import "ThemeColor.h" - -@interface XCShareView() - -@property (nonatomic, strong) UILabel *titleLabel; -@property (nonatomic, strong) UILabel *tipLabel; -@property (nonatomic, strong) UIButton *cancleButton; - -@property (nonatomic, strong) UICollectionView *collectionView; -@property (nonatomic, strong) NSArray *items; -@property (nonatomic, assign) CGSize itemSize; -@property (nonatomic, assign) CGFloat margin; -@property (nonatomic, assign) UIEdgeInsets edgeInsets; -@property (nonatomic, strong) UIView *contianterView;//容器 -@property (nonatomic, assign) CGFloat collectionH; - -@property (nonatomic, assign) XCShareViewStyle shareViewStyle; - -@end - -@implementation XCShareView - - -#pragma mark - Life Style -- (instancetype)initWithItemSize:(CGSize)itemSize items:(NSArray *)items margin:(CGFloat)margin{ - return [self initWithShareViewStyle:XCShareViewStyleCenter items:items itemSize:itemSize edgeInsets:UIEdgeInsetsMake(0, margin, 0, margin)]; -} - -- (instancetype)initWithShareViewStyle:(XCShareViewStyle)style items:(NSArray *)items itemSize:(CGSize)itemSize edgeInsets:(UIEdgeInsets)edgeInsets{ - - _shareViewStyle = style; - _items = items; - _itemSize = itemSize; - _edgeInsets = edgeInsets; - if (self=[super init]) { - [self setupSubviews]; - [self makeConstriants]; - [self configASMRUI]; - } - return self; -} - - -#pragma mark - UICollectionViewDelegate -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ - return self.items.count; -} -- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ - XCShareItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"XCShareItemCell" forIndexPath:indexPath]; - cell.shareItem = self.items[indexPath.row]; - return cell; -} -- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ - NSLog(@"%@",[self.items[indexPath.item] title]); - if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:didSelected:)]) { - XCShareItem *item = self.items[indexPath.item]; - [self.delegate shareView:self didSelected:item.itemTag]; - } -} - -#pragma mark - event response -- (void)cancleButtonDidClck:(UIButton *)button{ - - if (self.delegate && [self.delegate respondsToSelector:@selector(shareViewDidClickCancle:)]) { - [self.delegate shareViewDidClickCancle:self]; - } -} - - -#pragma mark - Private - -- (void)setupSubviews{ - self.backgroundColor = [UIColor clearColor]; - [self addSubview:self.contianterView]; - - if (self.shareViewStyle == XCShareViewStyleAll) { - [self.contianterView addSubview:self.titleLabel]; - [self.contianterView addSubview:self.tipLabel]; - } - - [self.contianterView addSubview:self.collectionView]; - - if (self.shareViewStyle == XCShareViewStyleCenterAndBottom || self.shareViewStyle == XCShareViewStyleAll) { - [self.contianterView addSubview:self.cancleButton]; - } - - [self.collectionView registerClass:[XCShareItemCell class] forCellWithReuseIdentifier:@"XCShareItemCell"]; -} - -- (void)makeConstriants{ - int collectionWidth = KScreenWidth-self.edgeInsets.left-self.edgeInsets.right; - int offset = (int)(self.items.count * self.itemSize.width) % collectionWidth; - int row = self.items.count * self.itemSize.width / collectionWidth ; - self.collectionH = (offset == 0 ? self.itemSize.height*row : self.itemSize.height*(row+1)); - - int cancleButtonH = 44; - - if (self.shareViewStyle == XCShareViewStyleCenter) { - - self.frame = CGRectMake(0, 0, KScreenWidth, self.collectionH + self.edgeInsets.top+self.edgeInsets.bottom + kSafeAreaBottomHeight); - self.collectionView.frame = CGRectMake(self.edgeInsets.left, self.edgeInsets.top, collectionWidth, self.collectionH); - - }else if (self.shareViewStyle == XCShareViewStyleCenterAndBottom){ - - self.frame = CGRectMake(0, 0, KScreenWidth, self.collectionH + self.edgeInsets.top+self.edgeInsets.bottom + cancleButtonH + kSafeAreaBottomHeight); - self.collectionView.frame = CGRectMake(self.edgeInsets.left, self.edgeInsets.top, collectionWidth, self.collectionH); - self.cancleButton.frame = CGRectMake(0, CGRectGetMaxY(self.collectionView.frame)+self.edgeInsets.bottom, KScreenWidth, cancleButtonH); - - }else if (self.shareViewStyle == XCShareViewStyleAll){ - - self.frame = CGRectMake(0, 0, KScreenWidth, self.collectionH + self.edgeInsets.top+self.edgeInsets.bottom + cancleButtonH + 55 + kSafeAreaBottomHeight); - self.titleLabel.frame =CGRectMake(0, 18, KScreenWidth, 14); - self.tipLabel.frame =CGRectMake(0, CGRectGetMaxY(self.titleLabel.frame)+10, KScreenWidth, 13); - self.collectionView.frame = CGRectMake(self.edgeInsets.left, CGRectGetMaxY(self.tipLabel.frame)+self.edgeInsets.top, collectionWidth, self.collectionH); - self.cancleButton.frame = CGRectMake(0, CGRectGetMaxY(self.collectionView.frame)+self.edgeInsets.bottom, KScreenWidth, cancleButtonH); - } - // 适配 iPhone X 系列安全区域 - self.contianterView.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height - kSafeAreaBottomHeight); - - - [self.collectionView reloadData]; -} - -- (void)configASMRUI{ - - self.titleLabel.text = @"分享到"; - self.titleLabel.font = [UIFont systemFontOfSize:14.0]; - self.titleLabel.textColor = [ThemeColor mainTextColor]; - self.titleLabel.textAlignment = NSTextAlignmentCenter; - - self.tipLabel.hidden = YES; - self.cancleButton.titleLabel.font = [UIFont systemFontOfSize:16.0]; - [self.cancleButton setTitleColor:[ThemeColor mainTextColor] forState:UIControlStateNormal]; -} - -- (UIView *)contianterView { - if (!_contianterView) { - _contianterView = [[UIView alloc] init]; - _contianterView.backgroundColor = [ThemeColor appCellBackgroundColor]; - _contianterView.layer.cornerRadius = 14.0; - _contianterView.layer.masksToBounds = YES; - } - return _contianterView; -} - -- (UILabel *)titleLabel{ - if (!_titleLabel) { - _titleLabel = [[UILabel alloc] init]; - _titleLabel.font = [UIFont systemFontOfSize:14.0]; - _titleLabel.textColor = [ThemeColor mainTextColor]; - _titleLabel.textAlignment = NSTextAlignmentCenter; - _titleLabel.text = @"分享给好友"; - } - return _titleLabel; -} -- (UILabel *)tipLabel{ - if (!_tipLabel) { - _tipLabel = [[UILabel alloc] init]; - _tipLabel.font = [UIFont systemFontOfSize:13.0]; - _tipLabel.textColor = [ThemeColor mainTextColor]; - _tipLabel.textAlignment = NSTextAlignmentCenter; -// _tipLabel.text = [NSString stringWithFormat:@"每天第一次分享免费领%@(不包含分享至%@好友)", [XCKeyWordTool sharedInstance].xcRedColor, MyAppName]; - } - return _tipLabel; -} - -- (UICollectionView *)collectionView{ - if (!_collectionView) { - UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; - layout.itemSize = self.itemSize; - layout.minimumInteritemSpacing = 0; - layout.minimumLineSpacing = 0; - _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; - _collectionView.backgroundColor = [ThemeColor appCellBackgroundColor]; - _collectionView.dataSource = self; - _collectionView.delegate = self; - } - return _collectionView; -} - -- (UIButton *)cancleButton{ - if (!_cancleButton) { - _cancleButton = [[UIButton alloc] init]; - [_cancleButton setBackgroundColor:[ThemeColor appBackgroundColor]]; - [_cancleButton setTitle:@"取消" forState:UIControlStateNormal]; - _cancleButton.titleLabel.font = [UIFont systemFontOfSize:14.0]; - [_cancleButton setTitleColor:[ThemeColor mainTextColor] forState:UIControlStateNormal]; - [_cancleButton addTarget:self action:@selector(cancleButtonDidClck:) forControlEvents:UIControlEventTouchUpInside]; - } - return _cancleButton; -} - -@end diff --git a/xplan-ios/Base/UI/ShareView/XPShareView.h b/xplan-ios/Base/UI/ShareView/XPShareView.h new file mode 100644 index 00000000..6acd68ba --- /dev/null +++ b/xplan-ios/Base/UI/ShareView/XPShareView.h @@ -0,0 +1,29 @@ +// +// XCShareView.h +// XCRoomMoudle +// +// Created by KevinWang on 2018/9/2. +// Copyright © 2018年 YiZhuan. All rights reserved. +// + +#import +#import "XPShareItem.h" +#import "XPShareInfoModel.h" + +@class XPShareView; +@protocol XCShareViewDelegate +///点了取消分享 +- (void)shareViewDidClickCancel:(XPShareView *)shareView; +///分享成功 +- (void)shareViewDidSuccess:(XPShareView *)shareView; +///分享失败 +- (void)shareView:(XPShareView *)shareView shareFail:(NSString *)message; +@end; + +@interface XPShareView : UIView + +@property (nonatomic, weak) id delegate; + +- (instancetype)initWithItems:(NSArray *)items itemSize:(CGSize)itemSize shareInfo:(XPShareInfoModel *)shareInfo; + +@end diff --git a/xplan-ios/Base/UI/ShareView/XPShareView.m b/xplan-ios/Base/UI/ShareView/XPShareView.m new file mode 100644 index 00000000..a71fc22c --- /dev/null +++ b/xplan-ios/Base/UI/ShareView/XPShareView.m @@ -0,0 +1,200 @@ +// +// XCShareView.m +// XCRoomMoudle +// +// Created by KevinWang on 2018/9/2. +// Copyright © 2018年 YiZhuan. All rights reserved. +// + +#import "XPShareView.h" +///Third +#import +#import +#import +///Tool +#import "XPMacro.h" +#import "ThemeColor.h" +///View +#import "XPShareItemCell.h" + +@interface XPShareView() +///取消 +@property (nonatomic, strong) UIButton *cancleButton; +///列表 +@property (nonatomic, strong) UICollectionView *collectionView; +///数据源 +@property (nonatomic, strong) NSArray *items; +///item的大小 +@property (nonatomic,assign) CGSize itemSize; +///分享的内容 +@property (nonatomic,strong) XPShareInfoModel *shareInfo; +@end + +@implementation XPShareView + +#pragma mark - Life Style +- (instancetype)initWithItems:(NSArray *)items itemSize:(CGSize)itemSize shareInfo:(XPShareInfoModel *)shareInfo { + if (self = [super init]) { + self.items = items; + self.itemSize =itemSize; + self.shareInfo = shareInfo; + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)initSubViews { + [self addSubview:self.collectionView]; + [self addSubview:self.cancleButton]; +} + +- (void)initSubViewConstraints { + + CGFloat collectionWidth = KScreenWidth - 15 * 2; + ///一行有几个 + int numberLine = collectionWidth / self.itemSize.width; + int page = self.items.count % numberLine > 0 ? (int)self.items.count / numberLine + 1 : (int)self.items.count / numberLine; + CGFloat collectionHeight = page * self.itemSize.height + 20 + (page-1) * 10 + 10; + [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self); + make.height.mas_equalTo(collectionHeight); + make.left.right.mas_equalTo(self).inset(15); + }]; + + [self.cancleButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(45); + make.left.right.mas_equalTo(self.collectionView); + make.top.mas_equalTo(self.collectionView.mas_bottom).offset(15); + }]; + + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(KScreenWidth); + make.bottom.mas_equalTo(self.cancleButton.mas_bottom).offset(30); + }]; +} + + +- (BOOL)isInstallClient:(SSDKPlatformType)platform { + return [ShareSDK isClientInstalled:platform]; +} + +- (SSDKPlatformType)getSharePlatformType:(XPShareItemTag)itemTag { + SSDKPlatformType type; + switch (itemTag) { + case XPShareItemTagQQ: + type = SSDKPlatformTypeQQ; + break; + case XPShareItemTagQQZone: + type = SSDKPlatformSubTypeQZone; + break; + case XPShareItemTagWeChat: + type = SSDKPlatformTypeWechat; + break; + case XPShareItemTagMoments: + type = SSDKPlatformSubTypeWechatTimeline; + break; + + default: + type = SSDKPlatformTypeUnknown; + break; + } + return type; +} + +#pragma mark - UICollectionViewDelegate +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ + return self.items.count; +} +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ + XPShareItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPShareItemCell class]) forIndexPath:indexPath]; + XPShareItem * item = [self.items objectAtIndex:indexPath.item]; + item.disable = [self isInstallClient:[self getSharePlatformType:item.type]]; + cell.shareItem = item; + return cell; +} +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ + [collectionView deselectItemAtIndexPath:indexPath animated:YES]; + XPShareItem * item = [self.items objectAtIndex:indexPath.item]; + NSMutableDictionary *shareParams = [NSMutableDictionary dictionary]; + NSString * title = [self.shareInfo shareTitle].length > 0 ? self.shareInfo.shareTitle : @""; + NSString * content = self.shareInfo.shareContent.length > 0 ? self.shareInfo.shareContent : @""; + NSString * urlString = self.shareInfo.shareUrl.length > 0 ?self.shareInfo.shareUrl : @""; + NSString * imageURL = self.shareInfo.shareImageUrl.length > 0 ? self.shareInfo.shareImageUrl : @""; + NSString *encodedUrl = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; + [shareParams SSDKSetupShareParamsByText:content + images:@[imageURL] + url:[NSURL URLWithString:encodedUrl] + title:title + type:SSDKContentTypeAuto]; + [ShareSDK share:[self getSharePlatformType:item.type] parameters:shareParams onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) { + switch (state) { + case SSDKResponseStateSuccess: + { + if (self.delegate && [self.delegate respondsToSelector:@selector(shareViewDidSuccess:)]) { + [self.delegate shareViewDidSuccess:self]; + } + } + break; + case SSDKResponseStateFail: + { + if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:shareFail:)]) { + [self.delegate shareView:self shareFail:@"分享失败"]; + } + } + break; + case SSDKResponseStateCancel: + { + if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:shareFail:)]) { + [self.delegate shareView:self shareFail:@"取消分享"]; + } + } + break; + default: + break; + } + }]; +} + +#pragma mark - Event Response +- (void)cancleButtonDidClck:(UIButton *)button{ + if (self.delegate && [self.delegate respondsToSelector:@selector(shareViewDidSuccess:)]) { + [self.delegate shareViewDidSuccess:self]; + } +} + +#pragma mark - Getters And Setters +- (UICollectionView *)collectionView{ + if (!_collectionView) { + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + layout.itemSize = self.itemSize; + layout.minimumInteritemSpacing = 0; + layout.minimumLineSpacing = 10; + layout.sectionInset = UIEdgeInsetsMake(20, 0, 10, 0); + _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + _collectionView.backgroundColor = [UIColor whiteColor]; + _collectionView.dataSource = self; + _collectionView.delegate = self; + _collectionView.layer.masksToBounds = YES; + _collectionView.layer.cornerRadius = 15; + [_collectionView registerClass:[XPShareItemCell class] forCellWithReuseIdentifier:NSStringFromClass([XPShareItemCell class])]; + } + return _collectionView; +} + +- (UIButton *)cancleButton{ + if (!_cancleButton) { + _cancleButton = [[UIButton alloc] init]; + [_cancleButton setBackgroundColor:[UIColor whiteColor]]; + [_cancleButton setTitle:@"取消" forState:UIControlStateNormal]; + _cancleButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:15]; + _cancleButton.layer.masksToBounds = YES; + _cancleButton.layer.cornerRadius = 45/2; + [_cancleButton setTitleColor:[ThemeColor textThirdColor] forState:UIControlStateNormal]; + [_cancleButton addTarget:self action:@selector(cancleButtonDidClck:) forControlEvents:UIControlEventTouchUpInside]; + } + return _cancleButton; +} + +@end diff --git a/xplan-ios/Global/XPHtmlUrl.h b/xplan-ios/Global/XPHtmlUrl.h index 83b078cc..55c5bd06 100644 --- a/xplan-ios/Global/XPHtmlUrl.h +++ b/xplan-ios/Global/XPHtmlUrl.h @@ -21,6 +21,8 @@ typedef NS_ENUM(NSUInteger, URLType) { kNurseryURL,///护苗计划 kRechargePrivacyURL,////充值协议 kReportRoomURL,///举报房间 + ///分享房间 + kShareRoomURL, }; NSString * const URLWithType(URLType type); diff --git a/xplan-ios/Global/XPHtmlUrl.m b/xplan-ios/Global/XPHtmlUrl.m index 05eb7c01..d87fc5ad 100644 --- a/xplan-ios/Global/XPHtmlUrl.m +++ b/xplan-ios/Global/XPHtmlUrl.m @@ -21,6 +21,7 @@ NSString * const URLWithType(URLType type) { @(kNurseryURL):@"activity/cleanNet/index.html", @(kRechargePrivacyURL) : @"modules/rule/rechargeAgreement.html",//充值协议 @(kReportRoomURL) : @"modules/inform/index.html",///举报房间 + @(kShareRoomURL) : @"modules/share_room/index.html",///分享房间 }; NSString * url = [dic objectForKey:@(type)]; diff --git a/xplan-ios/Main/IM/Model/AttachmentModel.h b/xplan-ios/Main/IM/Model/AttachmentModel.h index 35b6e9e1..519a77df 100644 --- a/xplan-ios/Main/IM/Model/AttachmentModel.h +++ b/xplan-ios/Main/IM/Model/AttachmentModel.h @@ -10,6 +10,8 @@ NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, CustomMessageType) { + ///房间提示 + CustomMessageType_Room_Tip = 2, ///送礼物的接口 CustomMessageType_Gift = 3, ///全麦送 @@ -19,19 +21,37 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) { }; +///first = CustomMessageType_Room_Tip +typedef NS_ENUM(NSUInteger, CustomMessageSubRoomTip) { + ///分享房间 + Custom_Message_Sub_Room_Tip_ShareRoom = 21, + ///关注房主 + Custom_Message_Sub_Room_Tip_Attention_Owner = 22, +}; + +///first = CustomMessageType_Gift typedef NS_ENUM(NSUInteger, CustomMessageSubGift) { - Custom_Message_Sub_Gift_Send = 31,//发送礼物 - Custom_Message_Sub_Gift_ChannelNotify = 32,//全服发送礼物 - Custom_Message_Sub_Gift_LuckySend = 34,//发送 福袋 礼物 + ///发送礼物 + Custom_Message_Sub_Gift_Send = 31, + ///全服发送礼物 + Custom_Message_Sub_Gift_ChannelNotify = 32, + ///发送 福袋 礼物 + Custom_Message_Sub_Gift_LuckySend = 34, }; +///first = CustomMessageType_ALLMicroSend typedef NS_ENUM(NSUInteger, CustomMessageSubAllMicroSend) { - Custom_Message_Sub_AllMicroSend = 121, //全麦送礼物 - Custom_Message_Sub_AllMicroLuckySend = 125, //全麦送 福袋 礼物 122老版本占用了 - Custom_Message_Sub_AllBatchSend = 123, // 非全麦 多人送礼 - Custom_Message_Sub_AllBatchMicroLuckySend = 124, // 非全麦 多人送福袋礼物 + ///全麦送礼物 + Custom_Message_Sub_AllMicroSend = 121, + ///非全麦 多人送礼 + Custom_Message_Sub_AllBatchSend = 123, + ///非全麦 多人送福袋礼物 + Custom_Message_Sub_AllBatchMicroLuckySend = 124, + ///全麦送 福袋 礼物 122老版本占用了 + Custom_Message_Sub_AllMicroLuckySend = 125, }; +///first = CustomMessageType_LuckyBag typedef NS_ENUM(NSUInteger, CustomMessageSubLuckyBag) { /// 福袋礼物房间飘屏通知 Custom_Message_Sub_Room_Gift_LuckBag= 610, diff --git a/xplan-ios/Main/Room/View/RoomHeaderView/RoomHeaderView.m b/xplan-ios/Main/Room/View/RoomHeaderView/RoomHeaderView.m index 1391d06f..d4635cd2 100644 --- a/xplan-ios/Main/Room/View/RoomHeaderView/RoomHeaderView.m +++ b/xplan-ios/Main/Room/View/RoomHeaderView/RoomHeaderView.m @@ -10,19 +10,29 @@ #import #import #import +#import "TTPopup.h" ///Tool #import "UIImage+Utils.h" #import "UIButton+EnlargeTouchArea.h" #import "XPMacro.h" #import "ThemeColor+Room.h" #import "TTPopup.h" +#import "XCHUDTool.h" #import "XPHtmlUrl.h" +#import "ApiHost.h" +#import "AccountInfoStorage.h" +#import "IMMessageHelper.h" ///Model #import "RoomInfoModel.h" +#import "UserInfoModel.h" +#import "AttachMentModel.h" +///View +#import "XPShareView.h" ///VC #import "XPWebViewcontroller.h" -@interface RoomHeaderView () + +@interface RoomHeaderView () ///返回按钮 @property (nonatomic,strong) UIButton *backButton; ///容器 @@ -64,13 +74,13 @@ return self; } -#pragma mark - Response +#pragma mark - Event Response - (void)backButtonAction:(UIButton *)sender { [self.hostDelegate exitRoom]; } - (void)shareButtonAction:(UIButton *)sender{ - + [self showSharePanel]; } - (void)settingButtonAction:(UIButton *)sender { @@ -156,6 +166,59 @@ } } +- (void)showSharePanel { + XPShareItem *cycle = [XPShareItem itemWitTag:XPShareItemTagMoments title:@"朋友圈" imageName:@"share_wechat_circle_normal" disableImageName:@"share_wechat_circle_disable"]; + XPShareItem *wechat = [XPShareItem itemWitTag:XPShareItemTagWeChat title:@"微信好友" imageName:@"share_wechat_normal" disableImageName:@"share_wechat_disable"]; + XPShareItem *qq = [XPShareItem itemWitTag:XPShareItemTagQQ title:@"QQ好友" imageName:@"share_qq_normal" disableImageName:@"share_qq_disable"]; + XPShareItem *qqzone = [XPShareItem itemWitTag:XPShareItemTagQQZone title:@"QQ空间" imageName:@"share_qqzone_normal" disableImageName:@"share_qqzone_disable"]; + NSArray * items = @[wechat,cycle, qq, qqzone]; + RoomInfoModel * roomInfo = [self.hostDelegate getRoomInfo]; + XPShareInfoModel * shareInfo = [[XPShareInfoModel alloc] init]; + shareInfo.shareTitle = @"玩和平精英赢奖金"; + shareInfo.shareContent = @"免费报名,奖金高,比赛多"; + shareInfo.shareImageUrl = [self.hostDelegate getRoomInfo].avatar; + NSString * uid = [AccountInfoStorage instance].getUid; + NSString * urlString = [NSString stringWithFormat:@"%@/%@?shareUid=%@&uid=%ld&room_name=%@&room_id=%ld&room_avatar=%@&share_name=%@",API_HOST_URL,URLWithType(kShareRoomURL),uid,roomInfo.uid,roomInfo.title,roomInfo.erbanNo,roomInfo.avatar,roomInfo.nick]; + shareInfo.shareUrl = urlString; + CGFloat margin = 15; + CGSize itemSize = CGSizeMake((KScreenWidth-2*margin)/4, 65); + XPShareView *shareView = [[XPShareView alloc] initWithItems:items itemSize:itemSize shareInfo:shareInfo]; + shareView.delegate = self; + [TTPopup popupView:shareView style:TTPopupStyleActionSheet]; +} + +#pragma mark - XCShareViewDelegate +- (void)shareView:(XPShareView *)shareView shareFail:(NSString *)message { + [TTPopup dismiss]; + [XCHUDTool showErrorWithMessage:message]; +} + +- (void)shareViewDidSuccess:(XPShareView *)shareView { + [TTPopup dismiss]; + [XCHUDTool showErrorWithMessage:@"分享成功"]; + AttachmentModel * attachMent = [[AttachmentModel alloc] init]; + attachMent.first = CustomMessageType_Room_Tip; + attachMent.second = Custom_Message_Sub_Room_Tip_ShareRoom; + NSMutableDictionary * dic = [NSMutableDictionary dictionary]; + NSString * uid = [AccountInfoStorage instance].getUid; + [dic setValue:uid forKey:@"uid"]; + NSMutableDictionary * userDic = [NSMutableDictionary dictionary]; + UserInfoModel * userInfo = [self.hostDelegate getUserInfo]; + RoomInfoModel * roomInfo = [self.hostDelegate getRoomInfo]; + [userDic setValue:roomInfo.nick.length > 0 ? roomInfo.nick : @"" forKey:@"targetNick"]; + [userDic setValue:@(roomInfo.uid) forKey:@"targetUid"]; + [userDic setValue:userInfo.nick.length > 0 ? userInfo.nick : @"" forKey:@"nick"]; + [dic setValue:userDic forKey:@"data"]; + attachMent.data = dic; + NSString *sessionID = [NSString stringWithFormat:@"%ld", [self.hostDelegate getRoomInfo].roomId]; + [IMMessageHelper sendCustomMessage:attachMent sessionId:sessionID type:NIMSessionTypeChatroom userInfo:userInfo]; +} + +- (void)shareViewDidClickCancel:(XPShareView *)shareView { + [TTPopup dismiss]; +} + +#pragma mark - Getters And Setters - (UIButton *)backButton{ if (!_backButton) { _backButton = [[UIButton alloc] init]; @@ -172,7 +235,6 @@ [_shareButton setImage:[UIImage imageNamed:@"room_info_share"] forState:UIControlStateNormal]; [_shareButton addTarget:self action:@selector(shareButtonAction:) forControlEvents:UIControlEventTouchUpInside]; [_shareButton setEnlargeEdgeWithTop:8 right:8 bottom:8 left:8]; - _shareButton.hidden = YES; } return _shareButton; } diff --git a/xplan-ios/Main/XPWebViewController.m b/xplan-ios/Main/XPWebViewController.m index 812d4f3d..2ce7b6d2 100644 --- a/xplan-ios/Main/XPWebViewController.m +++ b/xplan-ios/Main/XPWebViewController.m @@ -11,14 +11,14 @@ #import "ApiHost.h" #import "YYUtility.h" #import "HttpRequestHelper.h" -#import "XCShareView.h" +#import "XPShareView.h" #import "TTPopup.h" #import "XPMacro.h" #import #import #import -@interface WeakWebViewScriptMessageDelegate : NSObject +@interface WeakWebViewScriptMessageDelegate : NSObject //WKScriptMessageHandler 这个协议类专门用来处理JavaScript调用原生OC的方法 @property (nonatomic, weak) id scriptDelegate; @@ -186,46 +186,26 @@ NSString * const kJSOpenFaceLiveness = @"openFaceLiveness"; } - (void)showSharePanel { - XCShareItem *cycle = [[XCShareItem alloc]init]; - cycle.title = @"朋友圈"; - cycle.imageName = @"share_wxcircle"; - cycle.disableImageName = @"share_wxcircle_disable"; - cycle.disable = NO; - cycle.itemTag = XCShareItemTagMoments; - - XCShareItem *wfriend = [[XCShareItem alloc]init]; - wfriend.title = @"微信好友"; - wfriend.imageName = @"share_wx"; - wfriend.disableImageName = @"share_wx_disable"; - wfriend.disable = NO; - wfriend.itemTag = XCShareItemTagWeChat; - - XCShareItem *zone = [[XCShareItem alloc]init]; - zone.title = @"QQ空间"; - zone.imageName = @"share_qqzone"; - zone.disableImageName = @"share_qqzone_disable"; - zone.disable = NO; - zone.itemTag = XCShareItemTagQQZone; - - XCShareItem *qfriend = [[XCShareItem alloc]init]; - qfriend.title = @"QQ好友"; - qfriend.imageName = @"share_qq"; - qfriend.disableImageName = @"share_qq_disable"; - qfriend.disable = NO; - qfriend.itemTag = XCShareItemTagQQ; - - CGFloat margin = 9; - CGSize itemSize = CGSizeMake((KScreenWidth-2*margin)/4, 111); - XCShareView *shareView = [[XCShareView alloc]initWithItemSize:itemSize items:@[cycle,wfriend,zone,qfriend] margin:margin]; - shareView.delegate = self; - [TTPopup popupView:shareView style:TTPopupStyleActionSheet]; + XPShareItem *cycle = [XPShareItem itemWitTag:XPShareItemTagMoments title:@"朋友圈" imageName:@"share_wechat_circle_normal" disableImageName:@"share_wechat_circle_disable"]; + XPShareItem *wechat = [XPShareItem itemWitTag:XPShareItemTagMoments title:@"微信好友" imageName:@"share_wechat_normal" disableImageName:@"share_wechat_disable"]; + XPShareItem *qq = [XPShareItem itemWitTag:XPShareItemTagMoments title:@"QQ好友" imageName:@"share_qq_normal" disableImageName:@"share_qq_disable"]; + XPShareItem *qqzone = [XPShareItem itemWitTag:XPShareItemTagMoments title:@"QQ空间" imageName:@"share_qqzone_normal" disableImageName:@"share_qqzone_disable"]; + NSArray * items = @[wechat,cycle, qq, qqzone]; + XPShareInfoModel * shareInfo = [[XPShareInfoModel alloc] init]; + shareInfo.shareTitle = @"玩和平精英赢奖金"; + shareInfo.shareContent = @"免费报名,奖金高,比赛多"; + shareInfo.shareImageUrl = @""; + NSString * urlString = @""; + shareInfo.shareUrl = urlString; + CGFloat margin = 15; + CGSize itemSize = CGSizeMake((KScreenWidth-2*margin)/4, 65); + XPShareView *shareView = [[XPShareView alloc] initWithItems:items itemSize:itemSize shareInfo:shareInfo]; + shareView.delegate = self; + [TTPopup popupView:shareView style:TTPopupStyleActionSheet]; } -- (void)shareView:(XCShareView *)shareView didSelected:(XCShareItemTag)itemTag { - -} - -- (void)shareViewDidClickCancle:(XCShareView *)shareView { +#pragma mark - XCShareViewDelegate +- (void)shareViewDidClickCancle:(XPShareView *)shareView { }