├── .gitignore
├── ELENews
├── ELENews.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── EL.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── EL.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── ELENews.xcworkspace
│ └── contents.xcworkspacedata
├── ELENews
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── AppIcon29x29@2x.png
│ │ │ ├── AppIcon40x40@2x.png
│ │ │ ├── AppIcon60x60@2x.png
│ │ │ ├── AppIcon60x60@3x.png
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage-700-568h@2x.png
│ │ │ ├── LaunchImage-700@2x.png
│ │ │ ├── LaunchImage-800-667h@2x.png
│ │ │ └── LaunchImage-800-Portrait-736h@3x.png
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── ELENewsHeaders.pch
│ ├── Expand
│ │ ├── Cache
│ │ │ ├── ELNetworkCache.h
│ │ │ └── ELNetworkCache.m
│ │ ├── Category
│ │ │ ├── NSArray+Safe.h
│ │ │ ├── NSArray+Safe.m
│ │ │ ├── NSMutableArray+Safe.h
│ │ │ ├── NSMutableArray+Safe.m
│ │ │ ├── NSMutableDictionary+Safe.h
│ │ │ ├── NSMutableDictionary+Safe.m
│ │ │ ├── UIColor+extend.h
│ │ │ ├── UIColor+extend.m
│ │ │ ├── UIView+YYAdd.h
│ │ │ ├── UIView+YYAdd.m
│ │ │ ├── Utilities.h
│ │ │ └── Utilities.m
│ │ ├── Const
│ │ │ ├── ELConst.h
│ │ │ └── ELConst.m
│ │ ├── Macros
│ │ │ ├── ELMacros.h
│ │ │ ├── ELMacros.m
│ │ │ └── YYKitMacro.h
│ │ ├── NewWork
│ │ │ ├── ELHTTPManager.h
│ │ │ └── ELHTTPManager.m
│ │ └── Tool
│ │ │ ├── ELViewFactory.h
│ │ │ └── ELViewFactory.m
│ ├── Images.xcassets
│ │ └── LaunchImage.launchimage
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage-700-568h@2x.png
│ │ │ ├── LaunchImage-700@2x.png
│ │ │ ├── LaunchImage-800-667h@2x.png
│ │ │ └── LaunchImage-800-Portrait-736h@3x.png
│ ├── Info.plist
│ ├── Main
│ │ ├── Community
│ │ │ ├── Controller
│ │ │ │ ├── ELCommunityFeedBaseViewController.h
│ │ │ │ ├── ELCommunityFeedBaseViewController.m
│ │ │ │ ├── ELCommunityFindViewController.h
│ │ │ │ ├── ELCommunityFindViewController.m
│ │ │ │ ├── ELCommunityRecommendViewController.h
│ │ │ │ ├── ELCommunityRecommendViewController.m
│ │ │ │ ├── ELCommunityViewController.h
│ │ │ │ └── ELCommunityViewController.m
│ │ │ ├── Model
│ │ │ │ ├── ELCommunityActivityBean.h
│ │ │ │ ├── ELCommunityActivityBean.m
│ │ │ │ ├── ELCommunityAuthorBean.h
│ │ │ │ ├── ELCommunityAuthorBean.m
│ │ │ │ ├── ELCommunityBannerBean.h
│ │ │ │ ├── ELCommunityBannerBean.m
│ │ │ │ ├── ELCommunityCommentListBean.h
│ │ │ │ ├── ELCommunityCommentListBean.m
│ │ │ │ ├── ELCommunityFeedListBean.h
│ │ │ │ ├── ELCommunityFeedListBean.m
│ │ │ │ ├── ELCommunityFindPageBean.h
│ │ │ │ ├── ELCommunityFindPageBean.m
│ │ │ │ ├── ELCommunityOptBean.h
│ │ │ │ ├── ELCommunityOptBean.m
│ │ │ │ ├── ELCommunityRecommendPageBean.h
│ │ │ │ ├── ELCommunityRecommendPageBean.m
│ │ │ │ ├── ELCommunityStarBean.h
│ │ │ │ ├── ELCommunityStarBean.m
│ │ │ │ ├── ELCommunityTopicBean.h
│ │ │ │ ├── ELCommunityTopicBean.m
│ │ │ │ ├── ELCommunityTopicCategoryBean.h
│ │ │ │ └── ELCommunityTopicCategoryBean.m
│ │ │ ├── View
│ │ │ │ ├── ELCommunityFeedHeaderNote.h
│ │ │ │ ├── ELCommunityFeedHeaderNote.m
│ │ │ │ ├── ELCommunityFeedNode.h
│ │ │ │ ├── ELCommunityFeedNode.m
│ │ │ │ ├── ELCommunityFindActivityNode.h
│ │ │ │ ├── ELCommunityFindActivityNode.m
│ │ │ │ ├── ELCommunityFindAddStarNode.h
│ │ │ │ ├── ELCommunityFindAddStarNode.m
│ │ │ │ ├── ELCommunityFindDayTopicNode.h
│ │ │ │ ├── ELCommunityFindDayTopicNode.m
│ │ │ │ ├── ELCommunityFindTopicCategoryNode.h
│ │ │ │ ├── ELCommunityFindTopicCategoryNode.m
│ │ │ │ ├── ELCommunityStarNode.h
│ │ │ │ └── ELCommunityStarNode.m
│ │ │ └── ViewModel
│ │ │ │ ├── ELCommunityFindViewModel.h
│ │ │ │ ├── ELCommunityFindViewModel.m
│ │ │ │ ├── ELCommunityRecommendViewModel.h
│ │ │ │ └── ELCommunityRecommendViewModel.m
│ │ ├── Home
│ │ │ ├── Controller
│ │ │ │ ├── ELHomeViewController.h
│ │ │ │ ├── ELHomeViewController.m
│ │ │ │ ├── ELNewsDetailViewController.h
│ │ │ │ ├── ELNewsDetailViewController.m
│ │ │ │ ├── ELNewsPageViewController.h
│ │ │ │ ├── ELNewsPageViewController.m
│ │ │ │ ├── ELNewsPhotoDetailViewController.h
│ │ │ │ └── ELNewsPhotoDetailViewController.m
│ │ │ ├── Model
│ │ │ │ ├── ELChannelBean.h
│ │ │ │ ├── ELChannelBean.m
│ │ │ │ ├── ELDisplayViewScrollDelegate.h
│ │ │ │ ├── ELFlashListBean.h
│ │ │ │ ├── ELFlashListBean.m
│ │ │ │ ├── ELFlashPageBean.h
│ │ │ │ ├── ELFlashPageBean.m
│ │ │ │ ├── ELGIFListBean.h
│ │ │ │ ├── ELGIFListBean.m
│ │ │ │ ├── ELGIFPageBean.h
│ │ │ │ ├── ELGIFPageBean.m
│ │ │ │ ├── ELNewsDetailInfoPageBean.h
│ │ │ │ ├── ELNewsDetailInfoPageBean.m
│ │ │ │ ├── ELNewsDetailPageBean.h
│ │ │ │ ├── ELNewsDetailPageBean.m
│ │ │ │ ├── ELNewsListBean.h
│ │ │ │ ├── ELNewsListBean.m
│ │ │ │ ├── ELNewsPageBean.h
│ │ │ │ └── ELNewsPageBean.m
│ │ │ ├── View
│ │ │ │ ├── Detail
│ │ │ │ │ ├── ELNewsDetailAuthorNode.h
│ │ │ │ │ ├── ELNewsDetailAuthorNode.m
│ │ │ │ │ ├── ELNewsDetailCommentNode.h
│ │ │ │ │ ├── ELNewsDetailCommentNode.m
│ │ │ │ │ ├── ELNewsDetailContentNode.h
│ │ │ │ │ ├── ELNewsDetailContentNode.m
│ │ │ │ │ ├── ELNewsDetailTitleNode.h
│ │ │ │ │ ├── ELNewsDetailTitleNode.m
│ │ │ │ │ ├── ELNewsDetailView.h
│ │ │ │ │ └── ELNewsDetailView.m
│ │ │ │ └── Main
│ │ │ │ │ ├── ELFlashFeedNote.h
│ │ │ │ │ ├── ELFlashFeedNote.m
│ │ │ │ │ ├── ELGIFFeedNode.h
│ │ │ │ │ ├── ELGIFFeedNode.m
│ │ │ │ │ ├── ELNewsFeedNote.h
│ │ │ │ │ ├── ELNewsFeedNote.m
│ │ │ │ │ ├── ELNewsOneBigPicCenterFeedNote.h
│ │ │ │ │ ├── ELNewsOneBigPicCenterFeedNote.m
│ │ │ │ │ ├── ELNewsOneSmallPicLeftFeedNote.h
│ │ │ │ │ ├── ELNewsOneSmallPicLeftFeedNote.m
│ │ │ │ │ ├── ELNewsThreePicFeedNote.h
│ │ │ │ │ └── ELNewsThreePicFeedNote.m
│ │ │ └── ViewModel
│ │ │ │ ├── ELFeedViewModel.h
│ │ │ │ ├── ELFeedViewModel.m
│ │ │ │ ├── ELHomeChannelViewModel.h
│ │ │ │ ├── ELHomeChannelViewModel.m
│ │ │ │ ├── ELNewsDetailViewModel.h
│ │ │ │ └── ELNewsDetailViewModel.m
│ │ ├── Launch
│ │ │ ├── Model
│ │ │ │ ├── ELLaunchBean.h
│ │ │ │ └── ELLaunchBean.m
│ │ │ └── ViewModel
│ │ │ │ ├── ELLaunchManager.h
│ │ │ │ └── ELLaunchManager.m
│ │ ├── Other
│ │ │ ├── Base
│ │ │ │ ├── ELBindViewModelProtocol.h
│ │ │ │ ├── ELNetWorkBaseParams.h
│ │ │ │ ├── ELNetWorkBaseParams.m
│ │ │ │ ├── ELRefreshHeader.h
│ │ │ │ └── ELRefreshHeader.m
│ │ │ ├── BaseViewController
│ │ │ │ ├── ELBaseViewController.h
│ │ │ │ ├── ELBaseViewController.m
│ │ │ │ ├── ELDisplayViewController.h
│ │ │ │ ├── ELDisplayViewController.m
│ │ │ │ ├── ELMainTabBarController.h
│ │ │ │ ├── ELMainTabBarController.m
│ │ │ │ ├── ELNavgationController.h
│ │ │ │ └── ELNavgationController.m
│ │ │ ├── BaseViewModel
│ │ │ │ ├── ELBaseViewModel.h
│ │ │ │ ├── ELBaseViewModel.m
│ │ │ │ ├── ELTabbarViewModel.h
│ │ │ │ └── ELTabbarViewModel.m
│ │ │ └── PhotoBrowser
│ │ │ │ ├── ELPhotoBrowser.h
│ │ │ │ └── ELPhotoBrowser.m
│ │ └── Video
│ │ │ ├── Controller
│ │ │ ├── ELVideoDetailViewController.h
│ │ │ ├── ELVideoDetailViewController.m
│ │ │ ├── ELVideoViewController.h
│ │ │ └── ELVideoViewController.m
│ │ │ ├── Model
│ │ │ ├── ELVideoListBean.h
│ │ │ ├── ELVideoListBean.m
│ │ │ ├── ELVideoPageBean.h
│ │ │ └── ELVideoPageBean.m
│ │ │ └── View
│ │ │ ├── ELVideoDetailContentNode.h
│ │ │ ├── ELVideoDetailContentNode.m
│ │ │ ├── ELVideoNode.h
│ │ │ └── ELVideoNode.m
│ ├── Resource
│ │ ├── Image
│ │ │ ├── Community
│ │ │ │ ├── community_comment_20x20_@2x.png
│ │ │ │ ├── community_comment_20x20_@3x.png
│ │ │ │ ├── community_dabang_14x14_@2x.png
│ │ │ │ ├── community_dabang_14x14_@3x.png
│ │ │ │ ├── community_discover_activity_14x15_@2x.png
│ │ │ │ ├── community_discover_activity_14x15_@3x.png
│ │ │ │ ├── community_discover_cat_14x15_@2x.png
│ │ │ │ ├── community_discover_cat_14x15_@3x.png
│ │ │ │ ├── community_discover_idolAdd_70x70_@2x.png
│ │ │ │ ├── community_discover_idolAdd_70x70_@3x.png
│ │ │ │ ├── community_discover_idol_14x14_@2x.png
│ │ │ │ ├── community_discover_idol_14x14_@3x.png
│ │ │ │ ├── community_discover_topic_14x15_@2x.png
│ │ │ │ ├── community_discover_topic_14x15_@3x.png
│ │ │ │ ├── community_fast_40x11_@2x.png
│ │ │ │ ├── community_fast_40x11_@3x.png
│ │ │ │ ├── community_share_20x20_@2x.png
│ │ │ │ ├── community_share_20x20_@3x.png
│ │ │ │ ├── community_smallJuzi_20x20_@2x.png
│ │ │ │ ├── community_smallJuzi_20x20_@3x.png
│ │ │ │ ├── community_star_topShadow_110x90_@2x.png
│ │ │ │ ├── community_star_topShadow_110x90_@3x.png
│ │ │ │ ├── community_stars_fastBottom_110x28_@2x.png
│ │ │ │ ├── community_stars_fastBottom_110x28_@3x.png
│ │ │ │ ├── community_stars_todayBottom_110x28_@2x.png
│ │ │ │ ├── community_stars_todayBottom_110x28_@3x.png
│ │ │ │ ├── community_stars_weekBottom_110x28_@2x.png
│ │ │ │ ├── community_stars_weekBottom_110x28_@3x.png
│ │ │ │ ├── community_today_49x11_@2x.png
│ │ │ │ ├── community_today_49x11_@3x.png
│ │ │ │ ├── community_topicName_20x20_@2x.png
│ │ │ │ ├── community_topicName_20x20_@3x.png
│ │ │ │ ├── community_week_49x11_@2x.png
│ │ │ │ ├── community_week_49x11_@3x.png
│ │ │ │ ├── video_arrow_7x11_@2x.png
│ │ │ │ └── video_arrow_7x11_@3x.png
│ │ │ ├── Home
│ │ │ │ ├── home_nav_logo_91x26_@2x.png
│ │ │ │ ├── home_nav_logo_91x26_@3x.png
│ │ │ │ ├── person_arrow_9x5_@2x.png
│ │ │ │ ├── person_arrow_9x5_@3x.png
│ │ │ │ ├── person_arrow_up_9x5_@2x.png
│ │ │ │ └── person_arrow_up_9x5_@3x.png
│ │ │ ├── Main
│ │ │ │ ├── tabbar_background_os7_1x44_@2x.png
│ │ │ │ ├── tabbar_community_normal_40x40_@2x.png
│ │ │ │ ├── tabbar_community_normal_40x40_@3x.png
│ │ │ │ ├── tabbar_community_selected_40x40_@2x.png
│ │ │ │ ├── tabbar_community_selected_40x40_@3x.png
│ │ │ │ ├── tabbar_home_refresh_40x40_@2x.png
│ │ │ │ ├── tabbar_home_refresh_40x40_@3x.png
│ │ │ │ ├── tabbar_index_normal_40x40_@2x.png
│ │ │ │ ├── tabbar_index_normal_40x40_@3x.png
│ │ │ │ ├── tabbar_index_selected_40x40_@2x.png
│ │ │ │ ├── tabbar_index_selected_40x40_@3x.png
│ │ │ │ ├── tabbar_me_normal_40x40_@2x.png
│ │ │ │ ├── tabbar_me_normal_40x40_@3x.png
│ │ │ │ ├── tabbar_me_selected_40x40_@2x.png
│ │ │ │ ├── tabbar_me_selected_40x40_@3x.png
│ │ │ │ ├── tabbar_video_normal_40x40_@2x.png
│ │ │ │ ├── tabbar_video_normal_40x40_@3x.png
│ │ │ │ ├── tabbar_video_selected_40x40_@2x.png
│ │ │ │ └── tabbar_video_selected_40x40_@3x.png
│ │ │ ├── Other
│ │ │ │ ├── black_circle_back_33x33_@2x.png
│ │ │ │ ├── black_circle_back_33x33_@3x.png
│ │ │ │ ├── photo_gallary_back_35x35_@2x.png
│ │ │ │ ├── photo_gallary_back_35x35_@3x.png
│ │ │ │ ├── placehoderImg_145x108_@2x.png
│ │ │ │ └── placehoderImg_145x108_@3x.png
│ │ │ └── Video
│ │ │ │ ├── video_play_54x54_@2x.png
│ │ │ │ └── video_play_54x54_@3x.png
│ │ └── Loading
│ │ │ ├── loader_lottie.json
│ │ │ ├── loading.json
│ │ │ └── simple_loader.json
│ ├── Vender
│ │ ├── WMPlayer
│ │ │ ├── View
│ │ │ │ ├── FastForwardView.h
│ │ │ │ ├── FastForwardView.m
│ │ │ │ ├── FastForwardView.xib
│ │ │ │ ├── WMLightView.h
│ │ │ │ └── WMLightView.m
│ │ │ ├── WMPlayer.bundle
│ │ │ │ ├── WMPlayerBackground@2x.png
│ │ │ │ ├── WMPlayerBackground@3x.png
│ │ │ │ ├── ba_back@2x.png
│ │ │ │ ├── ba_back@3x.png
│ │ │ │ ├── bottom_shadow.png
│ │ │ │ ├── close@2x.png
│ │ │ │ ├── close@3x.png
│ │ │ │ ├── dot@2x.png
│ │ │ │ ├── dot@3x.png
│ │ │ │ ├── fullscreen@2x.png
│ │ │ │ ├── fullscreen@3x.png
│ │ │ │ ├── nonfullscreen@2x.png
│ │ │ │ ├── nonfullscreen@3x.png
│ │ │ │ ├── pause@2x.png
│ │ │ │ ├── pause@3x.png
│ │ │ │ ├── play@2x.png
│ │ │ │ ├── play@3x.png
│ │ │ │ ├── play_back.png
│ │ │ │ ├── play_new_brightness_day.png
│ │ │ │ ├── play_new_brightness_day@2x.png
│ │ │ │ ├── play_new_brightness_night.png
│ │ │ │ ├── play_new_brightness_night@2x.png
│ │ │ │ ├── progress_icon_l.png
│ │ │ │ ├── progress_icon_l@3x.png
│ │ │ │ ├── progress_icon_r.png
│ │ │ │ ├── progress_icon_r@3x.png
│ │ │ │ ├── top_shadow.png
│ │ │ │ ├── 全屏@2x.png
│ │ │ │ ├── 全屏@3x.png
│ │ │ │ ├── 播放@2x.png
│ │ │ │ ├── 播放@3x.png
│ │ │ │ ├── 播放显示@2x.png
│ │ │ │ ├── 播放显示@3x.png
│ │ │ │ ├── 暂停@2x.png
│ │ │ │ ├── 暂停@3x.png
│ │ │ │ ├── 返回@2x.png
│ │ │ │ └── 返回@3x.png
│ │ │ ├── WMPlayer.h
│ │ │ └── WMPlayer.m
│ │ ├── XLPhotoBrowser+CoderXL
│ │ │ ├── UIImage+XLExtension.h
│ │ │ ├── UIImage+XLExtension.m
│ │ │ ├── UIView+XLExtension.h
│ │ │ ├── UIView+XLExtension.m
│ │ │ ├── Vender
│ │ │ │ ├── FSActionSheet
│ │ │ │ │ ├── FSActionSheet.h
│ │ │ │ │ ├── FSActionSheet.m
│ │ │ │ │ ├── FSActionSheetCell.h
│ │ │ │ │ ├── FSActionSheetCell.m
│ │ │ │ │ ├── FSActionSheetConfig.h
│ │ │ │ │ ├── FSActionSheetConfig.m
│ │ │ │ │ ├── FSActionSheetItem.h
│ │ │ │ │ ├── FSActionSheetItem.m
│ │ │ │ │ └── FSActionSheetResources
│ │ │ │ │ │ ├── FSActionSheet_cancel@2x.png
│ │ │ │ │ │ └── FSActionSheet_cancel@3x.png
│ │ │ │ └── PageControl
│ │ │ │ │ ├── TAAbstractDotView.h
│ │ │ │ │ ├── TAAbstractDotView.m
│ │ │ │ │ ├── TAAnimatedDotView.h
│ │ │ │ │ ├── TAAnimatedDotView.m
│ │ │ │ │ ├── TADotView.h
│ │ │ │ │ ├── TADotView.m
│ │ │ │ │ ├── TAPageControl.h
│ │ │ │ │ └── TAPageControl.m
│ │ │ ├── XLPhotoBrowser.h
│ │ │ ├── XLPhotoBrowser.m
│ │ │ ├── XLPhotoBrowserConfig.h
│ │ │ ├── XLPhotoBrowserTypeDefine.h
│ │ │ ├── XLProgressView.h
│ │ │ ├── XLProgressView.m
│ │ │ ├── XLZoomingScrollView.h
│ │ │ └── XLZoomingScrollView.m
│ │ ├── YYFPSLabel
│ │ │ ├── YYFPSLabel.h
│ │ │ ├── YYFPSLabel.m
│ │ │ ├── YYWeakProxy.h
│ │ │ └── YYWeakProxy.m
│ │ └── YZDisplayViewController
│ │ │ ├── UIView+Frame.h
│ │ │ ├── UIView+Frame.m
│ │ │ ├── YZDisplayTitleLabel.h
│ │ │ ├── YZDisplayTitleLabel.m
│ │ │ ├── YZDisplayViewController.h
│ │ │ ├── YZDisplayViewController.m
│ │ │ ├── YZDisplayViewHeader.h
│ │ │ ├── YZFlowLayout.h
│ │ │ └── YZFlowLayout.m
│ └── main.m
├── ELENewsTests
│ ├── ELENewsTests.m
│ └── Info.plist
├── ELENewsUITests
│ ├── ELENewsUITests.m
│ └── Info.plist
├── Podfile
└── Podfile.lock
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *.xcuserdata
3 | *.xcuserstate
4 | *.xccheckout
5 | Pods/
6 | xcuserdata/
7 |
--------------------------------------------------------------------------------
/ELENews/ELENews.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ELENews/ELENews.xcodeproj/project.xcworkspace/xcuserdata/EL.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews.xcodeproj/project.xcworkspace/xcuserdata/EL.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ELENews/ELENews.xcodeproj/xcuserdata/EL.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ELENews.xcscheme
8 |
9 | orderHint
10 | 18
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ELENews/ELENews.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ELENews/ELENews/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/11/10.
6 | // Copyright © 2017年 ElegantLiar. 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 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "size" : "29x29",
15 | "idiom" : "iphone",
16 | "filename" : "AppIcon29x29@2x.png",
17 | "scale" : "2x"
18 | },
19 | {
20 | "idiom" : "iphone",
21 | "size" : "29x29",
22 | "scale" : "3x"
23 | },
24 | {
25 | "size" : "40x40",
26 | "idiom" : "iphone",
27 | "filename" : "AppIcon40x40@2x.png",
28 | "scale" : "2x"
29 | },
30 | {
31 | "idiom" : "iphone",
32 | "size" : "40x40",
33 | "scale" : "3x"
34 | },
35 | {
36 | "size" : "60x60",
37 | "idiom" : "iphone",
38 | "filename" : "AppIcon60x60@2x.png",
39 | "scale" : "2x"
40 | },
41 | {
42 | "size" : "60x60",
43 | "idiom" : "iphone",
44 | "filename" : "AppIcon60x60@3x.png",
45 | "scale" : "3x"
46 | },
47 | {
48 | "idiom" : "ipad",
49 | "size" : "20x20",
50 | "scale" : "1x"
51 | },
52 | {
53 | "idiom" : "ipad",
54 | "size" : "20x20",
55 | "scale" : "2x"
56 | },
57 | {
58 | "idiom" : "ipad",
59 | "size" : "29x29",
60 | "scale" : "1x"
61 | },
62 | {
63 | "idiom" : "ipad",
64 | "size" : "29x29",
65 | "scale" : "2x"
66 | },
67 | {
68 | "idiom" : "ipad",
69 | "size" : "40x40",
70 | "scale" : "1x"
71 | },
72 | {
73 | "idiom" : "ipad",
74 | "size" : "40x40",
75 | "scale" : "2x"
76 | },
77 | {
78 | "idiom" : "ipad",
79 | "size" : "76x76",
80 | "scale" : "1x"
81 | },
82 | {
83 | "idiom" : "ipad",
84 | "size" : "76x76",
85 | "scale" : "2x"
86 | },
87 | {
88 | "idiom" : "ipad",
89 | "size" : "83.5x83.5",
90 | "scale" : "2x"
91 | },
92 | {
93 | "idiom" : "ios-marketing",
94 | "size" : "1024x1024",
95 | "scale" : "1x"
96 | }
97 | ],
98 | "info" : {
99 | "version" : 1,
100 | "author" : "xcode"
101 | }
102 | }
--------------------------------------------------------------------------------
/ELENews/ELENews/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/ELENews/ELENews/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "11.0",
8 | "subtype" : "2436h",
9 | "scale" : "3x"
10 | },
11 | {
12 | "extent" : "full-screen",
13 | "idiom" : "iphone",
14 | "subtype" : "736h",
15 | "filename" : "LaunchImage-800-Portrait-736h@3x.png",
16 | "minimum-system-version" : "8.0",
17 | "orientation" : "portrait",
18 | "scale" : "3x"
19 | },
20 | {
21 | "extent" : "full-screen",
22 | "idiom" : "iphone",
23 | "subtype" : "667h",
24 | "filename" : "LaunchImage-800-667h@2x.png",
25 | "minimum-system-version" : "8.0",
26 | "orientation" : "portrait",
27 | "scale" : "2x"
28 | },
29 | {
30 | "orientation" : "portrait",
31 | "idiom" : "iphone",
32 | "filename" : "LaunchImage-700@2x.png",
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-700-568h@2x.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 | }
--------------------------------------------------------------------------------
/ELENews/ELENews/Assets.xcassets/LaunchImage.launchimage/LaunchImage-700-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Assets.xcassets/LaunchImage.launchimage/LaunchImage-700-568h@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Assets.xcassets/LaunchImage.launchimage/LaunchImage-700@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Assets.xcassets/LaunchImage.launchimage/LaunchImage-700@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Assets.xcassets/LaunchImage.launchimage/LaunchImage-800-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Assets.xcassets/LaunchImage.launchimage/LaunchImage-800-667h@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Assets.xcassets/LaunchImage.launchimage/LaunchImage-800-Portrait-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Assets.xcassets/LaunchImage.launchimage/LaunchImage-800-Portrait-736h@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/ELENews/ELENews/ELENewsHeaders.pch:
--------------------------------------------------------------------------------
1 | //
2 | // ELENewsHeaders.pch
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/5.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #ifndef ELENewsHeaders_pch
10 | #define ELENewsHeaders_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 | #import "ELMacros.h"
15 | #import "ELConst.h"
16 |
17 | #import "NSArray+Safe.h"
18 | #import "NSMutableArray+Safe.h"
19 | #import "NSMutableDictionary+Safe.h"
20 | #import "UIColor+extend.h"
21 | #import "ELViewFactory.h"
22 | #import "Utilities.h"
23 | #import "UINavigationController+FDFullscreenPopGesture.h"
24 |
25 | #import "YYModel.h"
26 | #import "ELRefreshHeader.h"
27 | #import "ReactiveCocoa.h"
28 | #import "Masonry.h"
29 | #import "AFNetworking.h"
30 | #import "AsyncDisplayKit.h"
31 | #import "ELHTTPManager.h"
32 | #import "ELNetWorkBaseParams.h"
33 | #import "UIView+YYAdd.h"
34 | #import "YYWebImage.h"
35 | #import "ELNetworkCache.h"
36 | #import "ELBindViewModelProtocol.h"
37 | #endif /* ELENewsHeaders_pch */
38 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Cache/ELNetworkCache.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNetworkCache.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/26.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELNetworkCache : YYCache
12 |
13 | + (ELNetworkCache *)shareInstance;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Cache/ELNetworkCache.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELNetworkCache.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/26.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELNetworkCache.h"
10 |
11 | @implementation ELNetworkCache
12 |
13 | + (instancetype)shareInstance{
14 | static ELNetworkCache *_instance;
15 | static dispatch_once_t onceToken;
16 | dispatch_once(&onceToken, ^{
17 | _instance = [ELNetworkCache cacheWithName:kELNetworkCache];
18 | });
19 | return _instance;
20 | }
21 |
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Category/NSArray+Safe.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+Safe.h
3 | // ECalendar-Pro
4 | //
5 | // Created by suishen.mobi on 14-8-14.
6 | // Copyright (c) 2014年 etouch. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSArray (Safe)
12 |
13 | #pragma mark 读取
14 |
15 | /**
16 | * 安全获取一条数据
17 | *
18 | * @param index 数组元素的下标
19 | *
20 | * @return 如果成功获取数据,就返回这条数据,否则就返回nil
21 | */
22 | - (id)safeObjectAtIndex:(NSUInteger)index;
23 |
24 | @end
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Category/NSArray+Safe.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+Safe.m
3 | // ECalendar-Pro
4 | //
5 | // Created by suishen.mobi on 14-8-14.
6 | // Copyright (c) 2014年 etouch. All rights reserved.
7 | //
8 |
9 | #import "NSArray+Safe.h"
10 |
11 | @implementation NSArray (Safe)
12 |
13 | #pragma mark 查询
14 | - (id)safeObjectAtIndex:(NSUInteger)index{
15 | if(index < [self count]){
16 | return [self objectAtIndex:index];
17 | }else{
18 | return nil;
19 | }
20 | }
21 |
22 | @end
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Category/NSMutableArray+Safe.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableArray+Safe.h
3 | // testArray
4 | //
5 | // Created by suishen.mobi on 13-12-26.
6 | // Copyright (c) 2013年 suishen.mobi. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSMutableArray (Safe)
12 |
13 | #pragma mark 增加
14 |
15 | /**
16 | * 安全向数组里加入一条数据,不管这条数据是否为nil
17 | *
18 | * @param anObject 一条需要增加的数据
19 | *
20 | * @return 返回是否增加成功 YES:成功 NO:失败
21 | */
22 | - (BOOL)safeAddObject:(id)anObject;
23 |
24 | /**
25 | * 安全向数组里加入一条数据,不管这条数据是否为nil
26 | *
27 | * @param anObject 一条需要增加的数据
28 | *
29 | * @return 返回是否增加成功 YES:成功 NO:失败
30 | */
31 | - (BOOL)safeInsertObject:(id)anObject atIndex:(NSUInteger)index;
32 |
33 | #pragma mark 删除
34 |
35 | /**
36 | * 安全从数组里删除一条数据
37 | *
38 | * @param index 所删除数据的下标值
39 | *
40 | * @return 是否删除成功 YES:成功 NO:失败
41 | */
42 | - (BOOL)safeRemoveObjectAtIndex:(NSInteger)index;
43 |
44 | #pragma mark 读取
45 |
46 | /**
47 | * 安全获取一条数据
48 | *
49 | * @param index 数组元素的下标
50 | *
51 | * @return 如果成功获取数据,就返回这条数据,否则就返回nil
52 | */
53 | - (id)safeObjectAtIndex:(NSUInteger)index;
54 |
55 | @end
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Category/NSMutableArray+Safe.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableArray+Safe.m
3 | // testArray
4 | //
5 | // Created by suishen.mobi on 13-12-26.
6 | // Copyright (c) 2013年 suishen.mobi. All rights reserved.
7 | //
8 |
9 | #import "NSMutableArray+Safe.h"
10 |
11 | @implementation NSMutableArray (Safe)
12 |
13 | - (BOOL)safeAddObject:(id)anObject{
14 | if(anObject){
15 | [self addObject:anObject];
16 | return YES;
17 | }else{
18 | return NO;
19 | }
20 | }
21 |
22 | - (BOOL)safeInsertObject:(id)anObject atIndex:(NSUInteger)index{
23 | if(anObject){
24 | if(index <= [self count]){
25 | [self insertObject:anObject atIndex:index];
26 | return YES;
27 | }else{
28 | return NO;
29 | }
30 | }else{
31 | return NO;
32 | }
33 | }
34 |
35 | #pragma mark 删除
36 | - (BOOL)safeRemoveObjectAtIndex:(NSInteger)index{
37 | if(index < [self count] && index >= 0){
38 | [self removeObjectAtIndex:index];
39 | return YES;
40 | }else{
41 | return NO;
42 | }
43 | }
44 |
45 | #pragma mark 查询
46 | - (id)safeObjectAtIndex:(NSUInteger)index{
47 | if(index < [self count]){
48 | return [self objectAtIndex:index];
49 | }else{
50 | return nil;
51 | }
52 | }
53 |
54 | @end
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Category/NSMutableDictionary+Safe.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableDictionary+Safe.h
3 | // ECalendar-Pro
4 | //
5 | // Created by suishen.mobi on 14-1-2.
6 | // Copyright (c) 2014年 etouch. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSMutableDictionary (Safe)
12 | @property (nonatomic,strong)dispatch_queue_t concurrentQueue;
13 |
14 | /**
15 | * 安全向字典里加入一条数据,不管这条数据是否为nil
16 | *
17 | * @param anObject 一条需要增加的数据
18 | * @param key key值
19 | *
20 | * @return 返回是否增加成功 YES:成功 NO:失败
21 | */
22 | - (BOOL)safeSetObject:(id)anObject forKey:(id)key;
23 |
24 |
25 | /**
26 | * 安全从字典里移除一条数据,不管这条数据是否为nil,如果是nil 就什么都不作
27 | *
28 | * @return 返回是否增加成功 YES:成功 NO:失败
29 | */
30 | - (BOOL)safeRemoveObjectForKey:(id)aKey;
31 |
32 | #pragma mark - 多线程方式
33 | //参考 https://mikeash.com/pyblog/friday-qa-2011-10-14-whats-new-in-gcd.html
34 |
35 | /**
36 | * 多线程安全向字典里加入一条数据,不管这条数据是否为nil 使用Q
37 | *
38 | * @param anObject 一条需要增加的数据
39 | * @param key key值
40 | *
41 | */
42 | - (void)safeQSetObject:(id)anObject forKey:(id)key;
43 |
44 |
45 | /**
46 | * 多线程安全从字典里移除一条数据,不管这条数据是否为nil,如果是nil 就什么都不做 使用Q
47 | *
48 | *
49 | */
50 | - (void)safeQRemoveObjectForKey:(id)aKey;
51 |
52 | /**
53 | * 多线程安全从字典里移除一条数据,不管这条数据是否为nil,如果是nil 就什么都不做 使用Q
54 | *
55 | *
56 | */
57 | - (void)safeQRemoveObjectsForKeys:(NSArray *)keyArray;
58 |
59 | /**
60 | * 多线程安全从字典里移除一条数据,不管这条数据是否为nil,如果是nil 就什么都不做 使用Q
61 | *
62 | */
63 | - (void)safeQRemoveAllObjects;
64 |
65 | /**
66 | * 多线程 安全从字典中去除一条数据 使用Q
67 | *
68 | *
69 | */
70 | - (id)safeQObjectForKey:(id)aKey;
71 |
72 | @end
73 |
74 |
75 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Category/NSMutableDictionary+Safe.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSMutableDictionary+Safe.m
3 | // ECalendar-Pro
4 | //
5 | // Created by suishen.mobi on 14-1-2.
6 | // Copyright (c) 2014年 etouch. All rights reserved.
7 | //
8 |
9 | #import "NSMutableDictionary+Safe.h"
10 | #import
11 |
12 |
13 | @implementation NSMutableDictionary (Safe)
14 |
15 | static char safeConcurrentQueueKey;
16 |
17 | - (dispatch_queue_t)concurrentQueue{
18 | dispatch_queue_t currentQueue = objc_getAssociatedObject(self, &safeConcurrentQueueKey);
19 | if(!currentQueue){
20 | currentQueue = dispatch_queue_create("com.etSafeMutableDic.concurrentQueue", DISPATCH_QUEUE_CONCURRENT);
21 | [self setConcurrentQueue:currentQueue];
22 | }
23 | return currentQueue;
24 | }
25 |
26 | - (void)setConcurrentQueue:(dispatch_queue_t)activityView{
27 | [self willChangeValueForKey:@"dispatch_queue_t"];
28 | objc_setAssociatedObject(self, &safeConcurrentQueueKey,
29 | activityView,
30 | OBJC_ASSOCIATION_RETAIN_NONATOMIC);
31 | [self didChangeValueForKey:@"dispatch_queue_t"];
32 | }
33 |
34 |
35 | - (BOOL)safeSetObject:(id)anObject forKey:(id)key{
36 | if(anObject && key){
37 | [self setObject:anObject forKey:key];
38 | return YES;
39 | }else{
40 | return NO;
41 | }
42 | }
43 |
44 | - (BOOL)safeRemoveObjectForKey:(id)aKey{
45 | if(aKey){
46 | [self removeObjectForKey:aKey];
47 | return YES;
48 | }else{
49 | return NO;
50 | }
51 | }
52 |
53 | #pragma mark - 多线程方式
54 | - (void)safeQSetObject:(id)anObject forKey:(id)key{
55 | dispatch_barrier_async(self.concurrentQueue, ^{
56 | [self safeSetObject:anObject forKey:key];
57 | });
58 | }
59 |
60 | - (void)safeQRemoveObjectForKey:(id)aKey{
61 | dispatch_barrier_async(self.concurrentQueue, ^{
62 | [self safeRemoveObjectForKey:aKey];
63 | });
64 | }
65 |
66 | - (void)safeQRemoveObjectsForKeys:(NSArray *)keyArray{
67 | dispatch_barrier_async(self.concurrentQueue, ^{
68 | [self removeObjectsForKeys:keyArray];
69 | });
70 | }
71 |
72 | - (void)safeQRemoveAllObjects{
73 | dispatch_barrier_async(self.concurrentQueue, ^{
74 | [self removeAllObjects];
75 | });
76 | }
77 |
78 | - (id)safeQObjectForKey:(id)aKey{
79 | __block id obj;
80 | dispatch_sync(self.concurrentQueue, ^{
81 | obj = [self objectForKey:aKey];
82 | });
83 | return obj;
84 | }
85 |
86 | @end
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Category/UIColor+extend.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIColor+extend.h
3 | // ETravel
4 | //
5 | // Created by XZoscar on 10-12-30.
6 | // Copyright 2010 华易科技. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface UIColor(extend)
13 |
14 | //支持长度为6或者8的颜色值
15 | + (UIColor *)hexChangeFloat:(NSString *)hexColor;
16 |
17 | + (UIColor *)hexChangeFloat:(NSString *)hexColor AndAlpha:(float)alpha;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Category/Utilities.h:
--------------------------------------------------------------------------------
1 | //
2 | // Utilities.h
3 | // Sample
4 | //
5 | // Created by Hannah Troisi on 3/9/16.
6 | //
7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
8 | // This source code is licensed under the BSD-style license found in the
9 | // LICENSE file in the root directory of this source tree. An additional grant
10 | // of patent rights can be found in the PATENTS file in the same directory.
11 | //
12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15 | // FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
16 | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
17 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | //
19 |
20 | @interface UIColor (Additions)
21 |
22 | + (UIColor *)darkBlueColor;
23 | + (UIColor *)lightBlueColor;
24 |
25 | @end
26 |
27 | @interface UIImage (Additions)
28 |
29 | + (UIImage *)followingButtonStretchableImageForCornerRadius:(CGFloat)cornerRadius following:(BOOL)followingEnabled;
30 | + (void)downloadImageForURL:(NSURL *)url completion:(void (^)(UIImage *))block;
31 |
32 | - (UIImage *)makeCircularImageWithSize:(CGSize)size;
33 |
34 | @end
35 |
36 | @interface NSString (Additions)
37 |
38 | // returns a user friendly elapsed time such as '50s', '6m' or '3w'
39 | + (NSString *)elapsedTimeStringSinceDate:(NSString *)uploadDateString;
40 |
41 | @end
42 |
43 | @interface NSAttributedString (Additions)
44 |
45 | + (NSAttributedString *)attributedStringWithString:(NSString *)string
46 | fontSize:(CGFloat)size
47 | color:(UIColor *)color
48 | firstWordColor:(UIColor *)firstWordColor;
49 |
50 | + (NSAttributedString *)attributedStringWithString:(NSString *)string
51 | fontSize:(CGFloat)size
52 | color:(UIColor *)color
53 | lineSpac:(CGFloat)lineSpce;
54 |
55 | + (NSAttributedString *)attributedStringWithString:(NSString *)string
56 | fontSize:(CGFloat)size
57 | color:(UIColor *)color
58 | lineSpac:(CGFloat)lineSpce
59 | textAlignment:(NSTextAlignment)textAlignment;
60 | @end
61 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Const/ELConst.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELConst.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/5.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 | #import
9 |
10 | /** 系统状态栏高度 */
11 | UIKIT_EXTERN CGFloat kAppStatusBarHeight;
12 | /** 系统导航栏高度 */
13 | UIKIT_EXTERN CGFloat const kAppNavigationBarHeight;
14 | /** 系统tabbar高度 */
15 | UIKIT_EXTERN CGFloat const kAppTabBarHeight;
16 |
17 | /** 系统间距字段 8 */
18 | UIKIT_EXTERN CGFloat const kAppPadding_8;
19 | /** 系统间距字段 12 */
20 | UIKIT_EXTERN CGFloat const kAppPadding_12;
21 | /** 系统间距字段 16 */
22 | UIKIT_EXTERN CGFloat const kAppPadding_16;
23 | /** 系统间距字段 20 */
24 | UIKIT_EXTERN CGFloat const kAppPadding_20;
25 | /** 系统间距字段 24 */
26 | UIKIT_EXTERN CGFloat const kAppPadding_24;
27 | /** 系统间距字段 28 */
28 | UIKIT_EXTERN CGFloat const kAppPadding_28;
29 | /** 系统间距字段 32 */
30 | UIKIT_EXTERN CGFloat const kAppPadding_32;
31 |
32 | UIKIT_EXTERN NSString * const kELNetworkCache;
33 | UIKIT_EXTERN NSString * const kELNetworkCacheChannel;
34 | UIKIT_EXTERN NSString * const kELNetworkCacheMainPage;
35 |
36 | UIKIT_EXTERN NSString * const kELDownloadLaunchVideoUrl;
37 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Const/ELConst.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELConst.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/5.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 |
10 | /** 系统状态栏高度 */
11 | CGFloat kAppStatusBarHeight = 20;
12 | /** 系统导航栏高度 */
13 | CGFloat const kAppNavigationBarHeight = 44;
14 | /** 系统tabbar高度 */
15 | CGFloat const kAppTabBarHeight = 49;
16 |
17 | /** 系统间距字段 8 */
18 | CGFloat const kAppPadding_8 = 8;
19 | /** 系统间距字段 12 */
20 | CGFloat const kAppPadding_12 = 12;
21 | /** 系统间距字段 16 */
22 | CGFloat const kAppPadding_16 = 16;
23 | /** 系统间距字段 20 */
24 | CGFloat const kAppPadding_20 = 20;
25 | /** 系统间距字段 24 */
26 | CGFloat const kAppPadding_24 = 24;
27 | /** 系统间距字段 28 */
28 | CGFloat const kAppPadding_28 = 28;
29 | /** 系统间距字段 32 */
30 | CGFloat const kAppPadding_32 = 32;
31 |
32 | NSString * const kELNetworkCache = @"kELNetworkCache";
33 | NSString * const kELNetworkCacheChannel = @"kELNetworkCacheChannel";
34 | NSString * const kELNetworkCacheMainPage = @"kELNetworkCacheMainPage";
35 |
36 | /** 上次下载的MP4的url*/
37 | NSString * const kELDownloadLaunchVideoUrl = @"kELDownloadLaunchVideoUrl";
38 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Macros/ELMacros.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELMacros.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/5.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | /**
10 | * 颜色
11 | */
12 | #define ELBlackColor [UIColor blackColor]
13 | #define ELBlueColor [UIColor blueColor]
14 | #define ELRedColor [UIColor redColor]
15 | #define ELWhiteColor [UIColor whiteColor]
16 | #define ELGrayColor [UIColor grayColor]
17 | #define ELDarkGrayColor [UIColor darkGrayColor]
18 | #define ELLightGrayColor [UIColor lightGrayColor]
19 | #define ELGreenColor [UIColor greenColor]
20 | #define ELCyanColor [UIColor cyanColor]
21 | #define ELYellowColor [UIColor yellowColor]
22 | #define ELMagentaColor [UIColor magentaColor]
23 | #define ELOrangeColor [UIColor orangeColor]
24 | #define ELPurpleColor [UIColor purpleColor]
25 | #define ELBrownColor [UIColor brownColor]
26 | #define ELClearColor [UIColor clearColor]
27 | #define ELLineColor [[UIColor hexChangeFloat:@"999999"] colorWithAlphaComponent:0.3]
28 |
29 | #define ELNotificationCenter [NSNotificationCenter defaultCenter]
30 |
31 | #define ELHomeNewsScrollViewDidScrollNotification @"ELHomeNewsScrollViewDidScrollNotification"
32 |
33 | /** 屏幕 */
34 | #define ELScreen [UIScreen mainScreen]
35 | /** 屏幕宽度 */
36 | #define ELScreenW [UIScreen mainScreen].bounds.size.width
37 | /** 屏幕高度 */
38 | #define ELScreenH [UIScreen mainScreen].bounds.size.height
39 | /** 屏幕bounds */
40 | #define ELScreenBounds [UIScreen mainScreen].bounds
41 | /** 屏幕伸缩度(Retina时值为2,非Retina值为1)*/
42 | #define ELScreenScale [UIScreen mainScreen].scale
43 |
44 | #define IS_iPHone6Plus ([UIScreen mainScreen].bounds.size.height == 736) ? YES : NO
45 |
46 | #define IS_iPHone6 ([UIScreen mainScreen].bounds.size.height == 667) ? YES : NO
47 |
48 | #define IS_iPHone5 ([UIScreen mainScreen].bounds.size.height == 568) ? YES : NO
49 |
50 | #define IS_iPHone4 ([UIScreen mainScreen].bounds.size.height == 480) ? YES : NO
51 | // 判断是否是iPhoneX
52 | #define IS_iPhoneX ([UIScreen mainScreen].bounds.size.height == 812) ? YES : NO
53 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Macros/ELMacros.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELMacros.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/5.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/NewWork/ELHTTPManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELHTTPManager.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/7.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELHTTPManager : AFHTTPSessionManager
12 |
13 | + (ELHTTPManager *)manager;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/NewWork/ELHTTPManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELHTTPManager.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/7.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELHTTPManager.h"
10 |
11 | @implementation ELHTTPManager
12 |
13 | + (instancetype)manager{
14 | static ELHTTPManager *_instance;
15 | static dispatch_once_t onceToken;
16 | dispatch_once(&onceToken, ^{
17 | _instance = [[self alloc] init];
18 | });
19 | return _instance;
20 | }
21 |
22 | - (instancetype)init{
23 | self = [super init];
24 | if (!self) return nil;
25 | self.requestSerializer.timeoutInterval = 10;
26 | self.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:
27 | @"application/json",
28 | @"text/json",
29 | @"text/javascript",
30 | @"text/plain",
31 | @"text/html",
32 | nil];
33 | return self;
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Tool/ELViewFactory.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELViewFactory.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/5.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELViewFactory : NSObject
12 |
13 | + (UILabel *)labelWithTextColor:(UIColor *)textColor
14 | numberOfLines:(NSInteger)numberOfLines
15 | text:(NSString *)text
16 | fontSize:(CGFloat)size;
17 |
18 |
19 | + (UILabel *)labelWithBackgroundColor:(UIColor *)backgroudColor
20 | textColor:(UIColor *)textColor
21 | textAlignment:(NSTextAlignment)textAlignment
22 | numberOfLines:(NSInteger)numberOfLines
23 | text:(NSString *)text
24 | fontSize:(CGFloat)size;
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Expand/Tool/ELViewFactory.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELViewFactory.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/5.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELViewFactory.h"
10 |
11 | @implementation ELViewFactory
12 |
13 | + (UILabel *)labelWithTextColor:(UIColor *)textColor
14 | numberOfLines:(NSInteger)numberOfLines
15 | text:(NSString *)text
16 | fontSize:(CGFloat)size{
17 | return [[self class] labelWithBackgroundColor:[UIColor clearColor]
18 | textColor:textColor
19 | textAlignment:NSTextAlignmentLeft
20 | numberOfLines:numberOfLines
21 | text:text
22 | fontSize:size];
23 | }
24 |
25 | + (UILabel *)labelWithBackgroundColor:(UIColor *)backgroudColor textColor:(UIColor *)textColor textAlignment:(NSTextAlignment)textAlignment numberOfLines:(NSInteger)numberOfLines text:(NSString *)text fontSize:(CGFloat)size{
26 | UILabel *label = [[UILabel alloc] init];
27 | label.backgroundColor = backgroudColor;
28 | label.textColor = textColor;
29 | label.textAlignment = textAlignment;
30 | label.numberOfLines = numberOfLines;
31 | label.text = text;
32 | label.font = [UIFont systemFontOfSize:size];
33 | return label;
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "11.0",
8 | "subtype" : "2436h",
9 | "scale" : "3x"
10 | },
11 | {
12 | "extent" : "full-screen",
13 | "idiom" : "iphone",
14 | "subtype" : "736h",
15 | "filename" : "LaunchImage-800-Portrait-736h@3x.png",
16 | "minimum-system-version" : "8.0",
17 | "orientation" : "portrait",
18 | "scale" : "3x"
19 | },
20 | {
21 | "extent" : "full-screen",
22 | "idiom" : "iphone",
23 | "subtype" : "667h",
24 | "filename" : "LaunchImage-800-667h@2x.png",
25 | "minimum-system-version" : "8.0",
26 | "orientation" : "portrait",
27 | "scale" : "2x"
28 | },
29 | {
30 | "orientation" : "portrait",
31 | "idiom" : "iphone",
32 | "filename" : "LaunchImage-700@2x.png",
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-700-568h@2x.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 | }
--------------------------------------------------------------------------------
/ELENews/ELENews/Images.xcassets/LaunchImage.launchimage/LaunchImage-700-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Images.xcassets/LaunchImage.launchimage/LaunchImage-700-568h@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Images.xcassets/LaunchImage.launchimage/LaunchImage-700@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Images.xcassets/LaunchImage.launchimage/LaunchImage-700@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Images.xcassets/LaunchImage.launchimage/LaunchImage-800-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Images.xcassets/LaunchImage.launchimage/LaunchImage-800-667h@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Images.xcassets/LaunchImage.launchimage/LaunchImage-800-Portrait-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Images.xcassets/LaunchImage.launchimage/LaunchImage-800-Portrait-736h@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/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 | NSAppTransportSecurity
24 |
25 | NSAllowsArbitraryLoads
26 |
27 |
28 | UIRequiredDeviceCapabilities
29 |
30 | armv7
31 |
32 | UISupportedInterfaceOrientations
33 |
34 | UIInterfaceOrientationPortrait
35 |
36 | UISupportedInterfaceOrientations~ipad
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationPortraitUpsideDown
40 | UIInterfaceOrientationLandscapeLeft
41 | UIInterfaceOrientationLandscapeRight
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Controller/ELCommunityFeedBaseViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFeedBaseViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELBaseViewController.h"
10 | #import "ELCommunityRecommendViewModel.h"
11 | #import "ELDisplayViewScrollDelegate.h"
12 |
13 | @interface ELCommunityFeedBaseViewController : ELBaseViewController
14 |
15 | @property (nonatomic, weak) id delegate;
16 |
17 | - (instancetype)initWithVcType:(ELCommunityFeedBaseViewControllerType)vcType;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Controller/ELCommunityFindViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFindViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELBaseViewController.h"
10 | #import "ELDisplayViewScrollDelegate.h"
11 |
12 | @interface ELCommunityFindViewController : ELBaseViewController
13 |
14 | @property (nonatomic, weak) id delegate;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Controller/ELCommunityRecommendViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityRecommendViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityFeedBaseViewController.h"
10 |
11 | @interface ELCommunityRecommendViewController : ELCommunityFeedBaseViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Controller/ELCommunityViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELDisplayViewController.h"
10 |
11 | @interface ELCommunityViewController : ELDisplayViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityActivityBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityActivityBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityActivityBean : NSObject
12 |
13 | @property (nonatomic, assign) NSInteger activityID;
14 | @property (nonatomic, strong) NSString *title;
15 | @property (nonatomic, strong) NSString *sub;
16 | @property (nonatomic, strong) NSString *pic;
17 | @property (nonatomic, strong) NSString *urlroute;
18 |
19 | - (NSAttributedString *)titleAttributedStringWithFontSize:(CGFloat)size;
20 | - (NSAttributedString *)subTitleAttributedStringWithFontSize:(CGFloat)size;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityActivityBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityActivityBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityActivityBean.h"
10 |
11 | @implementation ELCommunityActivityBean
12 |
13 | + (NSDictionary *)modelCustomPropertyMapper{
14 | return @{
15 | @"activityID" : @"id"
16 | };
17 | }
18 |
19 | - (NSAttributedString *)titleAttributedStringWithFontSize:(CGFloat)size{
20 | return [NSAttributedString attributedStringWithString:self.title
21 | fontSize:size
22 | color:[UIColor hexChangeFloat:@"666666"]
23 | firstWordColor:nil];
24 | }
25 |
26 | - (NSAttributedString *)subTitleAttributedStringWithFontSize:(CGFloat)size{
27 | return [NSAttributedString attributedStringWithString:self.sub
28 | fontSize:size
29 | color:[UIColor hexChangeFloat:@"999999"]
30 | firstWordColor:nil];
31 | }
32 | @end
33 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityAuthorBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityAuthorBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityAuthorBean : NSObject
12 |
13 | @property (nonatomic, assign) NSInteger authorID;
14 | @property (nonatomic, strong) NSString *name;
15 | @property (nonatomic, strong) NSString *avatar;
16 | @property (nonatomic, strong) NSString *avatar_box;
17 | @property (nonatomic, assign) NSInteger is_follow;
18 | @property (nonatomic, strong) NSString *url_route;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityAuthorBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityAuthorBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityAuthorBean.h"
10 |
11 | @implementation ELCommunityAuthorBean
12 |
13 | + (NSDictionary *)modelCustomPropertyMapper{
14 | return @{
15 | @"authorID" : @"id"
16 | };
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityBannerBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityBannerBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityBannerBean : NSObject
12 |
13 | @property (nonatomic, assign) NSInteger bannerID;
14 | @property (nonatomic, strong) NSString *img;
15 | @property (nonatomic, strong) NSString *urlroute;
16 | @property (nonatomic, assign) NSInteger type;
17 | @property (nonatomic, assign) NSInteger oid;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityBannerBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityBannerBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityBannerBean.h"
10 |
11 | @implementation ELCommunityBannerBean
12 |
13 | + (NSDictionary *)modelCustomPropertyMapper{
14 | return @{
15 | @"bannerID" : @"id"
16 | };
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityCommentListBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityCommentListBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELCommunityAuthorBean.h"
11 |
12 | @interface ELCommunityCommentListBean : NSObject
13 |
14 | @property (nonatomic, assign) NSInteger commentID;
15 | @property (nonatomic, strong) ELCommunityAuthorBean *author;
16 | @property (nonatomic, assign) NSInteger floor_num;
17 | @property (nonatomic, strong) NSString *create_time;
18 | @property (nonatomic, assign) NSInteger is_digg;
19 | @property (nonatomic, strong) NSString *content;
20 | @property (nonatomic, strong) NSArray *audio;
21 | @property (nonatomic, strong) NSArray *img;
22 | @property (nonatomic, strong) NSArray *at_topics_content;
23 | @property (nonatomic, strong) NSArray *at_user;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityCommentListBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityCommentListBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityCommentListBean.h"
10 |
11 | @implementation ELCommunityCommentListBean
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityFeedListBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFeedListBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELCommunityAuthorBean.h"
11 | #import "ELCommunityTopicBean.h"
12 | #import "ELCommunityCommentListBean.h"
13 |
14 | @interface ELCommunityFeedListBean : NSObject
15 |
16 | @property (nonatomic, assign) NSInteger feedID;
17 | @property (nonatomic, strong) NSString *title;
18 | @property (nonatomic, strong) NSString *share_title;
19 | @property (nonatomic, strong) NSString *content;
20 | @property (nonatomic, strong) NSString *create_time;
21 | @property (nonatomic, assign) NSInteger reply_num;
22 | @property (nonatomic, assign) NSInteger page_view;
23 | @property (nonatomic, assign) NSInteger credit_num;
24 | @property (nonatomic, strong) NSArray *img;
25 | @property (nonatomic, strong) NSArray *img_size;
26 | @property (nonatomic, strong) NSArray *at_topics_content;
27 | @property (nonatomic, strong) NSArray *at_topics_title;
28 | @property (nonatomic, strong) NSArray *audio;
29 | @property (nonatomic, strong) ELCommunityAuthorBean *author;
30 | @property (nonatomic, strong) ELCommunityTopicBean *topic;
31 | @property (nonatomic, strong) NSArray *comments;
32 | @property (nonatomic, strong) NSString *urlroute;
33 | @property (nonatomic, assign) BOOL is_rec;
34 | @property (nonatomic, strong) NSString *shareurl;
35 | @property (nonatomic, strong) NSString *shareimg;
36 | @property (nonatomic, strong) NSString *txtlead;
37 |
38 | - (NSAttributedString *)usernameAttributedStringWithFontSize:(CGFloat)size;
39 | - (NSAttributedString *)timeAttributedStringWithFontSize:(CGFloat)size;
40 | - (NSAttributedString *)titleAttributedStringWithFontSize:(CGFloat)size;
41 | - (NSAttributedString *)textAttributedStringWithFontSize:(CGFloat)size;
42 | - (NSAttributedString *)topicAttributedStringWithFontSize:(CGFloat)size;
43 |
44 | @end
45 |
46 |
47 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityFeedListBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFeedListBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityFeedListBean.h"
10 | #import "ELFlashListBean.h"
11 |
12 | @implementation ELCommunityFeedListBean
13 |
14 | + (NSDictionary *)modelCustomPropertyMapper{
15 | return @{
16 | @"feedID" : @"id"
17 | };
18 | }
19 |
20 | + (nullable NSDictionary *)modelContainerPropertyGenericClass{
21 | return @{
22 | @"img" : NSString.class,
23 | @"img_size" : ELFlashImageBean.class,
24 | @"comments" : ELCommunityCommentListBean.class
25 | };
26 | }
27 |
28 | - (NSAttributedString *)usernameAttributedStringWithFontSize:(CGFloat)size{
29 | return [NSAttributedString attributedStringWithString:self.author.name
30 | fontSize:size
31 | color:[UIColor hexChangeFloat:@"666666"]
32 | firstWordColor:nil];
33 | }
34 | - (NSAttributedString *)timeAttributedStringWithFontSize:(CGFloat)size{
35 | return [NSAttributedString attributedStringWithString:self.create_time
36 | fontSize:size
37 | color:[UIColor hexChangeFloat:@"999999"]
38 | firstWordColor:nil];
39 | }
40 | - (NSAttributedString *)titleAttributedStringWithFontSize:(CGFloat)size{
41 | return [NSAttributedString attributedStringWithString:self.title
42 | fontSize:size
43 | color:[UIColor hexChangeFloat:@"333333"]
44 | firstWordColor:nil];
45 | }
46 | - (NSAttributedString *)textAttributedStringWithFontSize:(CGFloat)size{
47 | return [NSAttributedString attributedStringWithString:self.content
48 | fontSize:size
49 | color:[UIColor hexChangeFloat:@"999999"]
50 | firstWordColor:nil];
51 | }
52 |
53 | - (NSAttributedString *)topicAttributedStringWithFontSize:(CGFloat)size{
54 | return [NSAttributedString attributedStringWithString:[NSString stringWithFormat:@"#%@", self.topic.title]
55 | fontSize:size
56 | color:[UIColor hexChangeFloat:@"FF3D3D"]
57 | firstWordColor:nil];
58 | }
59 | @end
60 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityFindPageBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFindPageBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELCommunityActivityBean.h"
11 |
12 | @interface ELCommunityFindPageBean : NSObject
13 |
14 | @property (nonatomic, strong) NSArray *opts;
15 | @property (nonatomic, strong) NSArray *topics;
16 | @property (nonatomic, strong) NSArray *cats;
17 | @property (nonatomic, strong) ELCommunityActivityBean *activity;
18 | @property (nonatomic, strong) NSArray *banners;
19 | @property (nonatomic, strong) NSArray *stars;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityFindPageBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFindPageBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityFindPageBean.h"
10 | #import "ELCommunityOptBean.h"
11 | #import "ELCommunityTopicBean.h"
12 | #import "ELCommunityBannerBean.h"
13 | #import "ELCommunityStarBean.h"
14 | #import "ELCommunityTopicCategoryBean.h"
15 |
16 | @implementation ELCommunityFindPageBean
17 |
18 | + (nullable NSDictionary *)modelContainerPropertyGenericClass{
19 | return @{
20 | @"opts" : ELCommunityOptBean.class,
21 | @"topics" : ELCommunityTopicBean.class,
22 | @"cats" : ELCommunityTopicCategoryBean.class,
23 | @"banners" : ELCommunityStarBean.class,
24 | @"stars" : ELCommunityTopicCategoryBean.class
25 | };
26 | }
27 |
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityOptBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityOptBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityOptBean : NSObject
12 |
13 | @property (nonatomic, assign) NSInteger optID;
14 | @property (nonatomic, strong) NSString *img;
15 | @property (nonatomic, strong) NSString *urlroute;
16 | @property (nonatomic, assign) NSInteger type;
17 | @property (nonatomic, assign) NSInteger oid;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityOptBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityOptBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityOptBean.h"
10 |
11 | @implementation ELCommunityOptBean
12 |
13 | + (NSDictionary *)modelCustomPropertyMapper{
14 | return @{
15 | @"optID" : @"id"
16 | };
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityRecommendPageBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityRecommendPageBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELCommunityOptBean.h"
11 |
12 | @interface ELCommunityRecommendPageBean : NSObject
13 |
14 | @property (nonatomic, strong) NSArray *list;
15 | @property (nonatomic, strong) ELCommunityOptBean *opt;
16 | @property (nonatomic, strong) NSArray *stars;
17 | @property (nonatomic, assign) NSInteger page;
18 | @end
19 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityRecommendPageBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityRecommendPageBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityRecommendPageBean.h"
10 | #import "ELCommunityFeedListBean.h"
11 | #import "ELCommunityStarBean.h"
12 |
13 | @implementation ELCommunityRecommendPageBean
14 |
15 | + (nullable NSDictionary *)modelContainerPropertyGenericClass{
16 | return @{
17 | @"list" : ELCommunityFeedListBean.class,
18 | @"stars" : ELCommunityStarBean.class
19 | };
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityStarBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityStarBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityStarBean : NSObject
12 |
13 | @property (nonatomic, assign) NSInteger starID;
14 | @property (nonatomic, strong) NSString *name;
15 | @property (nonatomic, strong) NSString *engname;
16 | @property (nonatomic, strong) NSString *portrait;
17 | @property (nonatomic, strong) NSString *bgpic;
18 |
19 | - (NSAttributedString *)starNameAttributedStringWithFontSize:(CGFloat)size;
20 | @end
21 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityStarBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityStarBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityStarBean.h"
10 |
11 | @implementation ELCommunityStarBean
12 |
13 | + (NSDictionary *)modelCustomPropertyMapper{
14 | return @{
15 | @"starID" : @"id"
16 | };
17 | }
18 |
19 | - (NSAttributedString *)starNameAttributedStringWithFontSize:(CGFloat)size{
20 | return [NSAttributedString attributedStringWithString:self.name
21 | fontSize:size
22 | color:[UIColor hexChangeFloat:@"333333"]
23 | firstWordColor:nil];
24 | }
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityTopicBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityTopicBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityTopicBean : NSObject
12 |
13 | @property (nonatomic, assign) NSInteger topicID;
14 | @property (nonatomic, strong) NSString *title;
15 | @property (nonatomic, strong) NSString *urlroute;
16 |
17 | - (NSAttributedString *)findTopicNameAttributedStringWithFontSize:(CGFloat)size;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityTopicBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityTopicBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityTopicBean.h"
10 |
11 | @implementation ELCommunityTopicBean
12 |
13 | + (NSDictionary *)modelCustomPropertyMapper{
14 | return @{
15 | @"topicID" : @"id"
16 | };
17 | }
18 |
19 | - (NSAttributedString *)findTopicNameAttributedStringWithFontSize:(CGFloat)size{
20 | return [NSAttributedString attributedStringWithString:[NSString stringWithFormat:@"#%@", self.title]
21 | fontSize:size
22 | color:[UIColor hexChangeFloat:@"999999"]
23 | firstWordColor:nil];
24 | }
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityTopicCategoryBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityTopicCategoryBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityTopicCategoryBean : NSObject
12 |
13 | @property (nonatomic, assign) NSInteger cateID;
14 | @property (nonatomic, strong) NSString *title;
15 | @property (nonatomic, strong) NSString *pic;
16 |
17 | - (NSAttributedString *)topicCategoryTitleAttributedStringWithFontSize:(CGFloat)size;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/Model/ELCommunityTopicCategoryBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityTopicCategoryBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityTopicCategoryBean.h"
10 |
11 | @implementation ELCommunityTopicCategoryBean
12 |
13 | + (NSDictionary *)modelCustomPropertyMapper{
14 | return @{
15 | @"cateID" : @"id"
16 | };
17 | }
18 |
19 | - (NSAttributedString *)topicCategoryTitleAttributedStringWithFontSize:(CGFloat)size{
20 | return [NSAttributedString attributedStringWithString:self.title
21 | fontSize:size
22 | color:[UIColor hexChangeFloat:@"666666"]
23 | firstWordColor:nil];
24 | }
25 | @end
26 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/View/ELCommunityFeedHeaderNote.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFeedHeaderNote.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/15.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityFeedHeaderNote : ASCellNode
12 |
13 | - (instancetype)initWithImageName:(NSString *)imageName
14 | Title:(NSString *)title
15 | hasMore:(BOOL)hasMore;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/View/ELCommunityFeedNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFeedNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELCommunityFeedListBean.h"
11 |
12 | @interface ELCommunityFeedNode : ASCellNode
13 |
14 | - (instancetype)initWithCommunityFeedListBean:(ELCommunityFeedListBean *)listBean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/View/ELCommunityFindActivityNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFindActivityNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/19.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELCommunityActivityBean.h"
11 |
12 | @interface ELCommunityFindActivityNode : ASCellNode
13 |
14 | - (instancetype)initWithCommunityActivityBean:(ELCommunityActivityBean *)bean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/View/ELCommunityFindAddStarNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFindAddStarNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityFindAddStarNode : ASCellNode
12 |
13 | - (instancetype)initWithCommunityStarsArray:(NSArray *)starsArray;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/View/ELCommunityFindAddStarNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFindAddStarNode.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityFindAddStarNode.h"
10 |
11 | @implementation ELCommunityFindAddStarNode
12 |
13 | - (instancetype)initWithCommunityStarsArray:(NSArray *)starsArray{
14 | if (self = [super init]) {
15 |
16 | }
17 | return self;
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/View/ELCommunityFindDayTopicNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFindDayTopicNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityFindDayTopicNode : ASCellNode
12 |
13 | - (instancetype)initWithCommunityWithTopics:(NSArray *)topics;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/View/ELCommunityFindTopicCategoryNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFindTopicCategoryNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/19.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELCommunityTopicCategoryBean.h"
11 |
12 | @interface ELCommunityFindTopicCategoryNode : ASCellNode
13 |
14 | - (instancetype)initWithCommunityTopicCategoryBean:(ELCommunityTopicCategoryBean *)bean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/View/ELCommunityStarNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityStarNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/15.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityStarNode : ASCellNode
12 |
13 | - (instancetype)initWithCommunityStarsArray:(NSArray *)starsArray;
14 |
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/ViewModel/ELCommunityFindViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFindViewModel.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELCommunityFindViewModel : NSObject
12 |
13 | @property (nonatomic, strong, readonly) RACCommand *requestCommand;
14 |
15 | - (void)loadDataFromNetwork;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/ViewModel/ELCommunityFindViewModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityFindViewModel.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/18.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityFindViewModel.h"
10 | #import "ELCommunityFindPageBean.h"
11 |
12 | @implementation ELCommunityFindViewModel
13 |
14 | - (void)loadDataFromNetwork{
15 | _requestCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal *(id input) {
16 | RACSignal *signal = [RACSignal createSignal:^RACDisposable *(id subscriber) {
17 | NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:[ELNetWorkBaseParams baseParams]];
18 | [params setObject:@(0) forKey:@"islogin"];
19 | [params setObject:@(1) forKey:@"page"];
20 | NSString *url = @"http://api.app.happyjuzi.com/shequ/index/discovery";
21 | [[ELHTTPManager manager] GET:url
22 | parameters:params
23 | progress:nil
24 | success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
25 | ELCommunityFindPageBean *findPageBean = [ELCommunityFindPageBean yy_modelWithJSON:[responseObject objectForKey:@"data"]];
26 | [subscriber sendNext:findPageBean];
27 | [subscriber sendCompleted];
28 |
29 | } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
30 | [subscriber sendError:error];
31 | }];
32 |
33 | return nil;
34 | }];
35 |
36 | return signal;
37 | }];
38 | }
39 |
40 | @end
41 |
42 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/ViewModel/ELCommunityRecommendViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityRecommendViewModel.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSInteger, ELCommunityFeedBaseViewControllerType) {
12 | ELCommunityFeedBaseViewControllerTypeRecommend = 0,
13 | ELCommunityFeedBaseViewControllerTypeLastNews
14 | };
15 |
16 | @interface ELCommunityRecommendViewModel : NSObject
17 |
18 | @property (nonatomic, strong, readonly) RACCommand *requestCommand;
19 |
20 | @property (nonatomic, assign) NSInteger page;
21 |
22 | @property (nonatomic, assign) ELCommunityFeedBaseViewControllerType type;
23 |
24 | - (void)loadDataFromNetwork;
25 |
26 | - (void)loadNextPageDataFromNetwork;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Community/ViewModel/ELCommunityRecommendViewModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELCommunityRecommendViewModel.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELCommunityRecommendViewModel.h"
10 | #import "ELCommunityRecommendPageBean.h"
11 |
12 | @implementation ELCommunityRecommendViewModel
13 |
14 | - (void)loadDataFromNetwork{
15 | _requestCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal *(id input) {
16 | RACSignal *signal = [RACSignal createSignal:^RACDisposable *(id subscriber) {
17 | NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:[ELNetWorkBaseParams baseParams]];
18 | [params setObject:@(0) forKey:@"islogin"];
19 | [params setObject:@(_page) forKey:@"page"];
20 | NSString *url = @"";
21 | if (_type == ELCommunityFeedBaseViewControllerTypeRecommend) {
22 | url = @"http://api.app.happyjuzi.com/shequ/index/index";
23 | } else if (_type == ELCommunityFeedBaseViewControllerTypeLastNews) {
24 | url = @"http://api.app.happyjuzi.com/shequ/index/feed";
25 | }
26 | [[ELHTTPManager manager] GET:url
27 | parameters:params
28 | progress:nil
29 | success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
30 |
31 | ELCommunityRecommendPageBean *communityPageBean = [ELCommunityRecommendPageBean yy_modelWithJSON:[responseObject objectForKey:@"data"]];
32 | [subscriber sendNext:communityPageBean];
33 | [subscriber sendCompleted];
34 |
35 | } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
36 | if (self->_page != 1) {
37 | self->_page --;
38 | }
39 | [subscriber sendError:error];
40 | }];
41 |
42 | return nil;
43 | }];
44 |
45 | return signal;
46 | }];
47 | }
48 |
49 | - (void)loadFirstPageDataFromNetwork{
50 | _page = 1;
51 | [self loadDataFromNetwork];
52 | }
53 |
54 | - (void)loadNextPageDataFromNetwork{
55 | _page ++;
56 | [self loadDataFromNetwork];
57 | }
58 | @end
59 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Controller/ELHomeViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELHomeViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/6.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELDisplayViewController.h"
10 |
11 | @interface ELHomeViewController : ELDisplayViewController
12 |
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Controller/ELNewsDetailViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsDetailViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELBaseViewController.h"
10 |
11 | @interface ELNewsDetailViewController : ELBaseViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Controller/ELNewsDetailViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsDetailViewController.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELNewsDetailViewController.h"
10 | #import "ELNewsDetailView.h"
11 | #import "ELNewsDetailViewModel.h"
12 |
13 | @interface ELNewsDetailViewController ()
14 |
15 | @property (nonatomic, strong, readonly) ELNewsDetailViewModel *viewModel;
16 |
17 | @end
18 |
19 |
20 | @implementation ELNewsDetailViewController{
21 | ELNewsDetailPageBean *_pageBean;
22 | ELNewsDetailView *_detailView;
23 | }
24 |
25 | @dynamic viewModel;
26 |
27 | #pragma mark – LifeCycle
28 | - (void)viewDidLoad {
29 | [super viewDidLoad];
30 | [self initUI];
31 |
32 | [self.viewModel loadDataFromNetwork];
33 | [self.viewModel loadInfoFromNetwork];
34 |
35 | @weakify(self);
36 | [[self.viewModel.requestCommand execute:nil] subscribeNext:^(ELNewsDetailPageBean *pageBean) {
37 | @strongify(self);
38 | self->_pageBean = pageBean;
39 | [self->_detailView setPageBean:self->_pageBean];
40 | } error:^(NSError *error) {
41 |
42 | }];
43 |
44 | [[self.viewModel.infoRequestCommand execute:nil] subscribeNext:^(ELNewsDetailInfoPageBean *infoPageBean) {
45 | @strongify(self);
46 | [self->_detailView setInfoPageBean:infoPageBean];
47 | } error:^(NSError *error) {
48 |
49 | }];
50 | }
51 | #pragma mark - Intial Methods
52 | - (void)initUI{
53 | _detailView = [[ELNewsDetailView alloc] init];
54 | _detailView.type = ELNewsDetailViewTypeNews;
55 | [self.baseContentView addSubview:_detailView];
56 | [_detailView mas_makeConstraints:^(MASConstraintMaker *make) {
57 | make.edges.mas_equalTo(self.baseContentView).with.insets(UIEdgeInsetsZero);
58 | }];
59 |
60 | }
61 | #pragma mark – Target Methods
62 |
63 | #pragma mark - Private Methods
64 |
65 | #pragma mark - Setter Getter Methods
66 |
67 | #pragma mark - External Delegate
68 |
69 |
70 | - (void)didReceiveMemoryWarning {
71 | [super didReceiveMemoryWarning];
72 | // Dispose of any resources that can be recreated.
73 | }
74 |
75 | @end
76 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Controller/ELNewsPageViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsPageViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/12.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELBaseViewController.h"
10 | #import "ELFeedViewModel.h"
11 | #import "ELDisplayViewScrollDelegate.h"
12 |
13 | @class ELSingleChannelBean;
14 |
15 | @interface ELNewsPageViewController : ELBaseViewController
16 |
17 | @property (nonatomic, strong) ELSingleChannelBean *singleChannelBean;
18 | @property (nonatomic, assign) ELTabType tabType;
19 | @property (nonatomic, weak) id delegate;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Controller/ELNewsPhotoDetailViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsPhotoDetailViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/22.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELBaseViewController.h"
10 |
11 | @interface ELNewsPhotoDetailViewController : ELBaseViewController
12 |
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Controller/ELNewsPhotoDetailViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsPhotoDetailViewController.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/22.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELNewsPhotoDetailViewController.h"
10 | #import "ELNewsDetailViewModel.h"
11 | #import "ELPhotoBrowser.h"
12 |
13 | @interface ELNewsPhotoDetailViewController ()
14 |
15 | @property (nonatomic, strong, readonly) ELNewsPhotoDetailViewModel *viewModel;
16 |
17 | @end
18 |
19 | @implementation ELNewsPhotoDetailViewController{
20 | ELNewsPhotoDetailPageBean *_pageBean;
21 | ELPhotoBrowser *_photoBrowser;
22 | }
23 |
24 | @dynamic viewModel;
25 |
26 | #pragma mark – LifeCycle
27 | - (void)viewDidLoad {
28 | [super viewDidLoad];
29 | [self initUI];
30 |
31 | [self.viewModel loadDataFromNetwork];
32 |
33 | @weakify(self);
34 | [[self.viewModel.requestCommand execute:nil] subscribeNext:^(ELNewsPhotoDetailPageBean *pageBean) {
35 | @strongify(self);
36 | self->_pageBean = pageBean;
37 | self->_photoBrowser = [ELPhotoBrowser showPhotoBrowserWithImages:self->_pageBean.photoUrls
38 | currentImageIndex:0
39 | rootView:self.view];
40 | self->_photoBrowser.placeholderImage = [UIImage imageNamed:@"placehoderImg_145x108_"];
41 | self->_photoBrowser.pageControlStyle = XLPhotoBrowserPageControlStyleNone;
42 | self->_photoBrowser.delegate = self;
43 | self->_photoBrowser.photoDetailPageBean = pageBean;
44 | } error:^(NSError *error) {
45 |
46 | }];
47 | }
48 | #pragma mark - Intial Methods
49 | - (void)initUI{
50 |
51 | }
52 | #pragma mark – Target Methods
53 |
54 | #pragma mark - Private Methods
55 |
56 | #pragma mark - Setter Getter Methods
57 |
58 | #pragma mark - XLPhotoBrowserDelegate
59 | - (void)photoBrowserClickSinglePhoto:(XLPhotoBrowser *)browser{
60 | }
61 |
62 | - (void)photoBrowserClickBackBtn:(XLPhotoBrowser *)browser{
63 | [self.navigationController popViewControllerAnimated:YES];
64 | [_photoBrowser dismiss];
65 | }
66 |
67 | - (void)didReceiveMemoryWarning {
68 | [super didReceiveMemoryWarning];
69 | // Dispose of any resources that can be recreated.
70 | }
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELChannelBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELChannelBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/7.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELChannelBean : NSObject
12 |
13 | @property (nonatomic, strong) NSArray *home;
14 | @property (nonatomic, strong) NSArray *video;
15 |
16 | @end
17 |
18 | @interface ELSingleChannelBean : NSObject
19 |
20 | @property (nonatomic, strong) NSString *name;
21 | @property (nonatomic, strong) NSString *pic;
22 | @property (nonatomic, assign) NSInteger flag;
23 | @property (nonatomic, assign) NSInteger channelID;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELChannelBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELChannelBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/7.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELChannelBean.h"
10 |
11 | @implementation ELChannelBean
12 |
13 | + (nullable NSDictionary *)modelContainerPropertyGenericClass{
14 | return @{
15 | @"home" : ELSingleChannelBean.class,
16 | @"video" : ELSingleChannelBean.class,
17 | };
18 | }
19 |
20 | @end
21 |
22 | @implementation ELSingleChannelBean
23 |
24 | + (NSDictionary *)modelCustomPropertyMapper{
25 | return @{
26 | @"channelID" : @"id"
27 | };
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELDisplayViewScrollDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELDisplayViewScrollDelegate.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/19.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol ELDisplayViewScrollDelegate
12 |
13 | - (void)elScrollViewHasScrolledWithContentOffset:(CGPoint)contentOffset;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELFlashListBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELFlashListBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/13.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class ELFlashImageBean;
12 |
13 | @interface ELFlashListBean : NSObject
14 |
15 | @property (nonatomic, assign) NSInteger flashID;
16 | @property (nonatomic, strong) NSString *title;
17 | @property (nonatomic, strong) NSString *text;
18 | @property (nonatomic, strong) NSString *link;
19 | @property (nonatomic, strong) NSString *pt;
20 | @property (nonatomic, strong) NSString *time;
21 | @property (nonatomic, strong) NSArray *imgs;
22 |
23 | - (NSAttributedString *)timeAttributedStringWithFontSize:(CGFloat)size;
24 | - (NSAttributedString *)titleAttributedStringWithFontSize:(CGFloat)size;
25 | - (NSAttributedString *)textAttributedStringWithFontSize:(CGFloat)size;
26 |
27 | @end
28 |
29 | @interface ELFlashImageBean : NSObject
30 |
31 | @property (nonatomic, assign) CGFloat width;
32 | @property (nonatomic, assign) CGFloat height;
33 | @property (nonatomic, assign) CGFloat size;
34 | @property (nonatomic, strong) NSString *src;
35 | @property (nonatomic, strong) NSString *thumb;
36 | @property (nonatomic, strong) NSString *org;
37 | @property (nonatomic, assign) BOOL high_img;
38 |
39 | @property (nonatomic, assign) CGFloat showWidth;
40 | @property (nonatomic, assign) CGFloat showHeight;
41 | @end
42 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELFlashListBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELFlashListBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/13.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELFlashListBean.h"
10 |
11 | @implementation ELFlashListBean
12 |
13 | + (nullable NSDictionary *)modelContainerPropertyGenericClass{
14 | return @{
15 | @"imgs" : ELFlashImageBean.class
16 | };
17 | }
18 |
19 | + (NSDictionary *)modelCustomPropertyMapper{
20 | return @{
21 | @"flashID" : @"id"
22 | };
23 | }
24 |
25 | - (NSAttributedString *)timeAttributedStringWithFontSize:(CGFloat)size{
26 | return [NSAttributedString attributedStringWithString:self.time
27 | fontSize:size
28 | color:[UIColor hexChangeFloat:@"999999"]
29 | firstWordColor:nil];
30 |
31 | }
32 |
33 | - (NSAttributedString *)titleAttributedStringWithFontSize:(CGFloat)size{
34 | return [NSAttributedString attributedStringWithString:self.title
35 | fontSize:size
36 | color:[UIColor hexChangeFloat:@"333333"]
37 | firstWordColor:nil];
38 |
39 | }
40 |
41 | - (NSAttributedString *)textAttributedStringWithFontSize:(CGFloat)size{
42 | return [NSAttributedString attributedStringWithString:self.text
43 | fontSize:size
44 | color:[UIColor hexChangeFloat:@"666666"]
45 | firstWordColor:nil];
46 | }
47 |
48 | @end
49 |
50 | @implementation ELFlashImageBean
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELFlashPageBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELFlashPageBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/12.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELFlashPageBean : NSObject
12 |
13 | @property (nonatomic, strong) NSArray *list;
14 | @property (nonatomic, assign) NSInteger page;
15 | @property (nonatomic, assign) long ts;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELFlashPageBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELFlashPageBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/12.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELFlashPageBean.h"
10 | #import "ELFlashListBean.h"
11 |
12 | @implementation ELFlashPageBean
13 |
14 | + (nullable NSDictionary *)modelContainerPropertyGenericClass{
15 | return @{
16 | @"list" : ELFlashListBean.class,
17 | };
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELGIFListBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELGIFListBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/13.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELNewsListBean.h"
11 |
12 | @class ELGIFBean;
13 |
14 | @interface ELGIFListBean : NSObject
15 |
16 | @property (nonatomic, assign) NSInteger gifID;
17 | @property (nonatomic, strong) NSString *title;
18 | @property (nonatomic, strong) NSString *txtlead;
19 | @property (nonatomic, strong) NSString *shareurl;
20 | @property (nonatomic, assign) NSInteger display;
21 | @property (nonatomic, assign) NSInteger replynum;
22 | @property (nonatomic, strong) ELGIFBean *gif;
23 | @property (nonatomic, strong) NSString *pt;
24 | @property (nonatomic, strong) NSString *time;
25 | @property (nonatomic, strong) NSArray *imgs;
26 | @property (nonatomic, strong) ELNewsAuthorBean *author;
27 |
28 | - (NSAttributedString *)usernameAttributedStringWithFontSize:(CGFloat)size;
29 | - (NSAttributedString *)titleAttributedStringWithFontSize:(CGFloat)size;
30 |
31 | @end
32 |
33 | @interface ELGIFBean : NSObject
34 |
35 | @property (nonatomic, assign) CGFloat width;
36 | @property (nonatomic, assign) CGFloat height;
37 | @property (nonatomic, strong) NSString *mp4;
38 | @property (nonatomic, strong) NSString *pic;
39 | @property (nonatomic, strong) NSString *url;
40 | @property (nonatomic, strong) NSString *thumb;
41 | @property (nonatomic, strong) NSString *thumb_jpg;
42 |
43 | @end
44 |
45 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELGIFListBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELGIFListBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/13.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELGIFListBean.h"
10 |
11 | @implementation ELGIFListBean
12 |
13 | + (NSDictionary *)modelCustomPropertyMapper{
14 | return @{
15 | @"gifID" : @"id"
16 | };
17 | }
18 |
19 | - (NSAttributedString *)titleAttributedStringWithFontSize:(CGFloat)size{
20 | return [NSAttributedString attributedStringWithString:self.title
21 | fontSize:size
22 | color:[UIColor hexChangeFloat:@"333333"]
23 | firstWordColor:nil];
24 | }
25 |
26 | - (NSAttributedString *)usernameAttributedStringWithFontSize:(CGFloat)size{
27 | return [NSAttributedString attributedStringWithString:self.author.name
28 | fontSize:size
29 | color:[UIColor darkBlueColor]
30 | firstWordColor:nil];
31 | }
32 |
33 | @end
34 |
35 | @implementation ELGIFBean
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELGIFPageBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELGIFPageBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/13.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELGIFPageBean : NSObject
12 |
13 | @property (nonatomic, strong) NSArray *list;
14 | @property (nonatomic, assign) NSInteger page;
15 | @property (nonatomic, assign) long ts;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELGIFPageBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELGifPageBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/13.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELGifPageBean.h"
10 | #import "ELGIFListBean.h"
11 |
12 | @implementation ELGIFPageBean
13 |
14 | + (nullable NSDictionary *)modelContainerPropertyGenericClass{
15 | return @{
16 | @"info" : ELNewsListBean.class,
17 | @"list" : ELGIFListBean.class,
18 | };
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELNewsListBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsListBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/13.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class ELNewsAuthorBean;
12 |
13 | typedef NS_ENUM(NSInteger, ELNewsListBeanDisplayType) {
14 | ELNewsListBeanDisplayTypeOneBigPicCenter = 101,
15 | ELNewsListBeanDisplayTypeOneSmallPicLeft,
16 | ELNewsListBeanDisplayTypeThreePic,
17 | };
18 | @interface ELNewsListBean : NSObject
19 |
20 | @property (nonatomic, assign) NSInteger newsID;
21 | @property (nonatomic, strong) NSString *title;
22 | @property (nonatomic, strong) NSString *pic;
23 | @property (nonatomic, strong) ELNewsAuthorBean *cat;
24 | @property (nonatomic, assign) NSInteger display;
25 | @property (nonatomic, strong) NSArray *gallary;
26 | @property (nonatomic, strong) NSString *urlroute;
27 |
28 | - (NSAttributedString *)usernameAttributedStringWithFontSize:(CGFloat)size;
29 | - (NSAttributedString *)newsAttributedStringWithFontSize:(CGFloat)size;
30 |
31 | @end
32 |
33 | @interface ELNewsAuthorBean : NSObject
34 |
35 | @property (nonatomic, assign) NSInteger authorID;
36 | @property (nonatomic, strong) NSString *name;
37 | @property (nonatomic, strong) NSString *pic;
38 | @property (nonatomic, strong) NSString *avatar_box;
39 | @property (nonatomic, strong) NSString *url_route;
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELNewsListBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsListBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/13.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELNewsListBean.h"
10 |
11 | @implementation ELNewsListBean
12 |
13 | + (NSDictionary *)modelCustomPropertyMapper{
14 | return @{
15 | @"newsID" : @"id"
16 | };
17 | }
18 |
19 | + (nullable NSDictionary *)modelContainerPropertyGenericClass{
20 | return @{
21 | @"gallary" : NSDictionary.class,
22 | };
23 | }
24 |
25 | - (NSAttributedString *)usernameAttributedStringWithFontSize:(CGFloat)size{
26 | return [NSAttributedString attributedStringWithString:self.cat.name
27 | fontSize:size
28 | color:[UIColor darkBlueColor]
29 | firstWordColor:nil];
30 | }
31 |
32 | - (NSAttributedString *)newsAttributedStringWithFontSize:(CGFloat)size{
33 | return [NSAttributedString attributedStringWithString:self.title
34 | fontSize:size
35 | color:[UIColor hexChangeFloat:@"333333"]
36 | firstWordColor:nil];
37 | }
38 |
39 | @end
40 |
41 | @implementation ELNewsAuthorBean
42 |
43 | + (NSDictionary *)modelCustomPropertyMapper{
44 | return @{
45 | @"authorID" : @"id"
46 | };
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELNewsPageBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsPageBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/12.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELNewsPageBean : NSObject
12 |
13 | @property (nonatomic, strong) NSArray *info;
14 | @property (nonatomic, strong) NSArray *flash;
15 | @property (nonatomic, strong) NSArray *list;
16 | @property (nonatomic, assign) NSInteger page;
17 | @property (nonatomic, assign) long ts;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/Model/ELNewsPageBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsPageBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/12.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELNewsPageBean.h"
10 | #import "ELNewsListBean.h"
11 |
12 | @implementation ELNewsPageBean
13 |
14 | + (nullable NSDictionary *)modelContainerPropertyGenericClass{
15 | return @{
16 | @"info" : ELNewsListBean.class,
17 | @"list" : ELNewsListBean.class,
18 | };
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Detail/ELNewsDetailAuthorNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsDetailAuthorNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELNewsDetailPageBean.h"
11 |
12 | @interface ELNewsDetailAuthorNode : ASCellNode
13 |
14 | - (instancetype)initWithNewsDetailInfoBean:(ELNewsDetailInfoBean *)detailInfoBean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Detail/ELNewsDetailCommentNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsDetailCommentNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/26.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELNewsDetailInfoPageBean.h"
11 |
12 | @interface ELNewsDetailCommentNode : ASCellNode
13 |
14 | - (instancetype)initWithCommentContentBean:(ELNewsDetailCommentContentBean *)contentBean;
15 |
16 | @end
17 |
18 | @interface ELNewsDetailCommentTitleNode : ASCellNode
19 |
20 | - (instancetype)initWithTitle:(NSString *)title;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Detail/ELNewsDetailContentNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsDetailContentNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELNewsDetailPageBean.h"
11 |
12 | @interface ELNewsDetailContentNode : ASCellNode
13 |
14 | - (instancetype)initWithNewsDetailParagraphBean:(ELNewsDetailParagraphBean *)bean
15 | detailPageBean:(ELNewsDetailPageBean *)pageBean;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Detail/ELNewsDetailTitleNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsDetailTitleNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELNewsDetailTitleNode : ASCellNode
12 |
13 | - (instancetype)initWithTitle:(NSString *)title;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Detail/ELNewsDetailTitleNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsDetailTitleNode.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELNewsDetailTitleNode.h"
10 |
11 | @implementation ELNewsDetailTitleNode{
12 | ASTextNode *_titleNode;
13 | }
14 |
15 | - (instancetype)initWithTitle:(NSString *)title{
16 | if (self = [super init]) {
17 | self.selectionStyle = UITableViewCellSelectionStyleNone;
18 |
19 | _titleNode = [[ASTextNode alloc] init];
20 | _titleNode.attributedText = [NSAttributedString attributedStringWithString:title
21 | fontSize:23
22 | color:[UIColor hexChangeFloat:@"333333"]
23 | firstWordColor:nil];
24 | [self addSubnode:_titleNode];
25 | }
26 | return self;
27 | }
28 |
29 | - (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize{
30 | ASInsetLayoutSpec *contentInsetSpec = [ASInsetLayoutSpec insetLayoutSpecWithInsets:UIEdgeInsetsMake(10, 10, 10, 10)
31 | child:_titleNode];
32 | return contentInsetSpec;
33 | }
34 | @end
35 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Detail/ELNewsDetailView.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsDetailView.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELNewsDetailPageBean.h"
11 | #import "ELNewsDetailInfoPageBean.h"
12 |
13 | typedef NS_ENUM(NSInteger, ELNewsDetailViewType) {
14 | ELNewsDetailViewTypeNews = 0,
15 | ELNewsDetailViewTypeVideo,
16 | };
17 | @interface ELNewsDetailView : UIView
18 |
19 | @property (nonatomic, strong) ELNewsDetailPageBean *pageBean;
20 | @property (nonatomic, strong) ELNewsDetailInfoPageBean *infoPageBean;
21 |
22 | @property (nonatomic, assign) ELNewsDetailViewType type;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Main/ELFlashFeedNote.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELFlashFeedNote.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/12.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELFlashListBean.h"
11 |
12 | @interface ELFlashFeedNote : ASCellNode
13 |
14 | - (instancetype)initWithFlashListBean:(ELFlashListBean *)flashListBean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Main/ELGIFFeedNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELGIFFeedNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/13.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELGIFListBean.h"
11 |
12 | @interface ELGIFFeedNode : ASCellNode
13 |
14 | - (instancetype)initWithGIFListBean:(ELGIFListBean *)gifListBean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Main/ELNewsFeedNote.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsFeedNote.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/12.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELNewsListBean.h"
11 |
12 | @interface ELNewsFeedNote : ASCellNode
13 |
14 | - (instancetype)initWithNewsListBean:(ELNewsListBean *)newsListBean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Main/ELNewsOneBigPicCenterFeedNote.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsOneBigPicCenterFeedNote.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELNewsListBean.h"
11 |
12 | @interface ELNewsOneBigPicCenterFeedNote : ASCellNode
13 |
14 | - (instancetype)initWithNewsListBean:(ELNewsListBean *)newsListBean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Main/ELNewsOneSmallPicLeftFeedNote.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsOneSmallPicLeftFeedNote.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELNewsListBean.h"
11 |
12 | @interface ELNewsOneSmallPicLeftFeedNote : ASCellNode
13 |
14 | - (instancetype)initWithNewsListBean:(ELNewsListBean *)newsListBean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/View/Main/ELNewsThreePicFeedNote.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsThreePicFeedNote.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELNewsListBean.h"
11 |
12 | @interface ELNewsThreePicFeedNote : ASCellNode
13 |
14 | - (instancetype)initWithNewsListBean:(ELNewsListBean *)newsListBean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/ViewModel/ELFeedViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELFeedViewModel.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/7.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELBaseViewModel.h"
11 | #import "ELChannelBean.h"
12 |
13 | typedef NS_ENUM(NSInteger, ELFeedType) {
14 | ELFeedTypeNews = 0,
15 | ELFeedTypeFlash,
16 | ELFeedTypeGif
17 | };
18 |
19 | typedef NS_ENUM(NSInteger, ELTabType) {
20 | ELTabTypeHome = 0,
21 | ELTabTypeVideo
22 | };
23 |
24 | @interface ELFeedViewModel : ELBaseViewModel
25 |
26 | - (instancetype)initWithELSingleChannelBean:(ELSingleChannelBean *)bean;
27 |
28 | @property (nonatomic, strong, readonly) RACCommand *requestCommand;
29 |
30 | @property (nonatomic, strong, readonly) RACCommand *cacheCommand;
31 |
32 | @property (nonatomic, assign) NSInteger channelID;
33 |
34 | @property (nonatomic, assign) NSInteger page;
35 |
36 | @property (nonatomic, assign) NSInteger flag;
37 |
38 | @property (nonatomic, assign) ELFeedType feedType;
39 |
40 | @property (nonatomic, assign) ELTabType tabType;
41 |
42 |
43 | - (void)loadFirstPageDataFromNetwork;
44 |
45 | - (void)loadNextPageDataFromNetwork;
46 |
47 | - (void)loadFirstPageDataFromCache;
48 |
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/ViewModel/ELHomeChannelViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELHomeChannelViewModel.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/7.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELChannelBean.h"
11 |
12 | @interface ELHomeChannelViewModel : NSObject
13 |
14 | @property (nonatomic, strong) ELChannelBean *channelBean;
15 |
16 | @property (nonatomic, strong, readonly) RACCommand *requestCommand;
17 |
18 | @property (nonatomic, strong, readonly) RACCommand *cacheCommand;
19 |
20 | + (ELHomeChannelViewModel *)shareInstance;
21 |
22 | - (void)loadDataFromNetwork;
23 |
24 | - (void)loadChannelDataFromCache;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/ViewModel/ELHomeChannelViewModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELHomeChannelViewModel.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/7.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELHomeChannelViewModel.h"
10 |
11 | @implementation ELHomeChannelViewModel
12 |
13 | + (ELHomeChannelViewModel *)shareInstance{
14 | static ELHomeChannelViewModel *viewModel = nil;
15 | static dispatch_once_t onceToken;
16 | dispatch_once(&onceToken, ^{
17 | viewModel = [[ELHomeChannelViewModel alloc] init];
18 | });
19 | return viewModel;
20 | }
21 |
22 | - (void)loadDataFromNetwork{
23 | @weakify(self);
24 |
25 | _requestCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal *(id input) {
26 | RACSignal *signal = [RACSignal createSignal:^RACDisposable *(id subscriber) {
27 | @strongify(self);
28 |
29 | [[ELHTTPManager manager] GET:@"http://api.app.happyjuzi.com/common/menu"
30 | parameters:[ELNetWorkBaseParams baseParams]
31 | progress:nil
32 | success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
33 | [[ELNetworkCache shareInstance] setObject:responseObject forKey:kELNetworkCacheChannel withBlock:nil];
34 | self.channelBean = [ELChannelBean yy_modelWithJSON:[responseObject objectForKey:@"data"]];
35 | [subscriber sendNext:self.channelBean];
36 | [subscriber sendCompleted];
37 |
38 | } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
39 | [subscriber sendError:error];
40 | }];
41 |
42 | return nil;
43 | }];
44 |
45 | return signal;
46 | }];
47 | }
48 |
49 | - (void)loadChannelDataFromCache{
50 | @weakify(self);
51 |
52 | _cacheCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal *(id input) {
53 | RACSignal *signal = [RACSignal createSignal:^RACDisposable *(id subscriber) {
54 | @strongify(self);
55 |
56 | id responseObject = [[ELNetworkCache shareInstance] objectForKey:kELNetworkCacheChannel];
57 | if (responseObject) {
58 | self.channelBean = [ELChannelBean yy_modelWithJSON:[responseObject objectForKey:@"data"]];
59 | [subscriber sendNext:self.channelBean];
60 | [subscriber sendCompleted];
61 | } else {
62 | [subscriber sendCompleted];
63 | }
64 |
65 | return nil;
66 | }];
67 |
68 | return signal;
69 | }];
70 | }
71 |
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Home/ViewModel/ELNewsDetailViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNewsDetailViewModel.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELNewsDetailPageBean.h"
10 | #import "ELNewsDetailInfoPageBean.h"
11 | #import "ELBaseViewModel.h"
12 | #import "ELNewsListBean.h"
13 |
14 | @interface ELNewsDetailViewModel : ELBaseViewModel
15 |
16 | @property (nonatomic, strong, readonly) RACCommand *requestCommand;
17 |
18 | @property (nonatomic, strong, readonly) RACCommand *infoRequestCommand;
19 |
20 | @property (nonatomic, assign) NSInteger newsID;
21 |
22 | - (instancetype)initWithListBean:(ELNewsListBean *)listBean;
23 |
24 | - (void)loadDataFromNetwork;
25 |
26 | - (void)loadInfoFromNetwork;
27 |
28 |
29 | @end
30 |
31 | @interface ELNewsPhotoDetailViewModel : ELBaseViewModel
32 |
33 | @property (nonatomic, strong, readonly) RACCommand *requestCommand;
34 |
35 | @property (nonatomic, assign) NSInteger newsID;
36 |
37 | - (instancetype)initWithListBean:(ELNewsListBean *)listBean;
38 |
39 | - (void)loadDataFromNetwork;
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Launch/Model/ELLaunchBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELLaunchBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/27.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class ELLaunchSplashBean;
12 | @interface ELLaunchBean : NSObject
13 |
14 | @property (nonatomic, strong) ELLaunchSplashBean *splash;
15 |
16 | @end
17 |
18 | @interface ELLaunchSplashBean : NSObject
19 |
20 | @property (nonatomic, strong) NSString *urlroute;
21 | @property (nonatomic, strong) NSString *splash;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Launch/Model/ELLaunchBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELLaunchBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/27.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELLaunchBean.h"
10 |
11 | @implementation ELLaunchBean
12 |
13 | @end
14 |
15 | @implementation ELLaunchSplashBean
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Launch/ViewModel/ELLaunchManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELLaunchManager.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/27.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XHLaunchAd.h"
11 |
12 | @interface ELLaunchManager : NSObject
13 |
14 |
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/Base/ELBindViewModelProtocol.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELBindViewModelProtocol.h
3 | // ELENews
4 | //
5 | // Created by EL on 2018/1/2.
6 | // Copyright © 2018年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol ELBindViewModelProtocol
12 |
13 | - (void)bindViewModel;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/Base/ELNetWorkBaseParams.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNetWorkBaseParams.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/12.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELNetWorkBaseParams : NSObject
12 |
13 | + (NSDictionary *)baseParams;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/Base/ELNetWorkBaseParams.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELNetWorkBaseParams.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/12.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELNetWorkBaseParams.h"
10 |
11 | @implementation ELNetWorkBaseParams
12 |
13 | + (NSDictionary *)baseParams{
14 | return @{
15 | @"accesstoken" : @"ab70a6b0de0ca33563c3b1dc39b79d51",
16 | @"brand" : @"Apple",
17 | @"carrier" : @"3",
18 | @"idfa" : @"A5FBDFCB-A55A-4C10-8760-663591A38884",
19 | @"model" : @"iPhone6",
20 | @"net" : @"wifi",
21 | @"pf" : @"ios",
22 | @"res" : @"375x667",
23 | @"size" : @"20",
24 | @"startup" : @"1",
25 | @"system" : @"11.0.3",
26 | @"uid" : @"4163863113584163",
27 | @"ver" : @"4.1"
28 | };
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/Base/ELRefreshHeader.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELRefreshHeader.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELRefreshHeader : MJRefreshGifHeader
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/Base/ELRefreshHeader.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELRefreshHeader.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/21.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELRefreshHeader.h"
10 | #import "Lottie.h"
11 |
12 |
13 | @implementation ELRefreshHeader{
14 | LOTAnimationView *_animationView;
15 | }
16 |
17 | #pragma mark - 重写父类的方法
18 | - (void)prepare{
19 | [super prepare];
20 |
21 | _animationView = [LOTAnimationView animationNamed:@"simple_loader.json" inBundle:[NSBundle mainBundle]];
22 | _animationView.loopAnimation = YES;
23 | _animationView.frame = CGRectMake((ELScreenW - 80)/2, (self.height - 80)/2, 80, 80);
24 | [self addSubview:_animationView];
25 | [_animationView play];
26 |
27 | //隐藏时间
28 | self.lastUpdatedTimeLabel.hidden = YES;
29 | //隐藏状态
30 | self.stateLabel.hidden = YES;
31 | }
32 |
33 | #pragma mark 监听控件的刷新状态
34 | - (void)setState:(MJRefreshState)state{
35 | MJRefreshCheckState;
36 | switch (state) {
37 | case MJRefreshStateIdle:
38 | [_animationView play];
39 | break;
40 | case MJRefreshStatePulling:
41 | [_animationView play];
42 | break;
43 | case MJRefreshStateRefreshing:
44 | [_animationView play];
45 | break;
46 | case MJRefreshStateWillRefresh:
47 | [_animationView play];
48 | break;
49 | case MJRefreshStateNoMoreData:
50 | [_animationView pause];
51 | break;
52 | default:
53 | break;
54 | }
55 | }
56 |
57 | - (void)placeSubviews{
58 | [super placeSubviews];
59 |
60 | _animationView.left = (self.width - 80) / 2.f;
61 | }
62 |
63 |
64 | @end
65 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/BaseViewController/ELBaseViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELBaseViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/5.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELBaseViewModel.h"
11 |
12 | @interface ELBaseViewController : UIViewController
13 |
14 | @property (nonatomic, strong) UIView *baseNavigationView;
15 | @property (nonatomic, strong) UIView *baseContentView;
16 |
17 | @property (nonatomic, strong, readonly) ELBaseViewModel *viewModel;
18 |
19 | - (instancetype)initWithViewModel:(ELBaseViewModel *)viewModel;
20 |
21 | - (void)bindViewModel;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/BaseViewController/ELDisplayViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELDisplayViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/6.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "YZDisplayViewController.h"
10 | #import "ELTabbarViewModel.h"
11 |
12 | @interface ELDisplayViewController : YZDisplayViewController
13 |
14 | @property (nonatomic, strong, readonly) ELTabbarViewModel *viewModel;
15 |
16 | - (instancetype)initWithViewModel:(ELBaseViewModel *)viewModel;
17 |
18 | - (void)bindViewModel;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/BaseViewController/ELMainTabBarController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELMainTabBarController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/5.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELMainTabBarController : UITabBarController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/BaseViewController/ELNavgationController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELNavgationController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/5.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "UINavigationController+FDFullscreenPopGesture.h"
11 |
12 | @interface ELNavgationController : UINavigationController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/BaseViewController/ELNavgationController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELNavgationController.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/5.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELNavgationController.h"
10 |
11 | @interface ELNavgationController ()
12 |
13 | @end
14 |
15 | @implementation ELNavgationController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view.
20 |
21 | }
22 |
23 | - (void)viewWillAppear:(BOOL)animated{
24 | [super viewWillAppear:animated];
25 | [self setNavigationBarHidden:YES animated:NO];
26 | }
27 |
28 | - (void)viewWillDisappear:(BOOL)animated{
29 | [super viewWillDisappear:animated];
30 | [self setNavigationBarHidden:NO animated:NO];
31 | }
32 |
33 |
34 | - (void)didReceiveMemoryWarning {
35 | [super didReceiveMemoryWarning];
36 | // Dispose of any resources that can be recreated.
37 | }
38 |
39 | /*
40 | #pragma mark - Navigation
41 |
42 | // In a storyboard-based application, you will often want to do a little preparation before navigation
43 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
44 | // Get the new view controller using [segue destinationViewController].
45 | // Pass the selected object to the new view controller.
46 | }
47 | */
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/BaseViewModel/ELBaseViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELBaseViewModel.h
3 | // ELENews
4 | //
5 | // Created by EL on 2018/1/2.
6 | // Copyright © 2018年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELBaseViewModel : NSObject
12 |
13 | @property (nonatomic, strong) NSString *title;
14 | @property (nonatomic, strong) NSString *iconImageUrl;
15 | @property (nonatomic, strong) NSString *iconImageName;
16 | @property (nonatomic, assign) CGSize iconSize;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/BaseViewModel/ELBaseViewModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELBaseViewModel.m
3 | // ELENews
4 | //
5 | // Created by EL on 2018/1/2.
6 | // Copyright © 2018年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELBaseViewModel.h"
10 |
11 | @implementation ELBaseViewModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/BaseViewModel/ELTabbarViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELTabbarViewModel.h
3 | // ELENews
4 | //
5 | // Created by EL on 2018/1/2.
6 | // Copyright © 2018年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELBaseViewModel.h"
10 |
11 | @interface ELTabbarViewModel : ELBaseViewModel
12 |
13 | - (instancetype)initWithTitle:(NSString *)title
14 | tabbarTitle:(NSString *)tabbarTitle
15 | tabbarDefaultImage:(NSString *)tabbarDefaultImage
16 | tabbarSelectedImage:(NSString *)tabbarSelectedImage;
17 |
18 | @property (nonatomic, strong) NSString *tabbarTitle;
19 | @property (nonatomic, strong) NSString *tabbarDefaultImage;
20 | @property (nonatomic, strong) NSString *tabbarSelectedImage;
21 | @property (nonatomic, strong) NSMutableDictionary *textAttrs;
22 | @property (nonatomic, strong) NSMutableDictionary *selectTextAttrs;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/BaseViewModel/ELTabbarViewModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELTabbarViewModel.m
3 | // ELENews
4 | //
5 | // Created by EL on 2018/1/2.
6 | // Copyright © 2018年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELTabbarViewModel.h"
10 |
11 | @implementation ELTabbarViewModel
12 |
13 | - (instancetype)initWithTitle:(NSString *)title
14 | tabbarTitle:(NSString *)tabbarTitle
15 | tabbarDefaultImage:(NSString *)tabbarDefaultImage
16 | tabbarSelectedImage:(NSString *)tabbarSelectedImage{
17 | if (self = [super init]) {
18 | self.title = title;
19 | _tabbarTitle = tabbarTitle;
20 | _tabbarDefaultImage = tabbarDefaultImage;
21 | _tabbarSelectedImage = tabbarSelectedImage;
22 |
23 | _textAttrs = @{}.mutableCopy;
24 | _textAttrs[NSForegroundColorAttributeName] = [UIColor hexChangeFloat:@"999999"];
25 |
26 | _selectTextAttrs = @{}.mutableCopy;
27 | _selectTextAttrs[NSForegroundColorAttributeName] = [UIColor hexChangeFloat:@"FF625D"];
28 | }
29 | return self;
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Other/PhotoBrowser/ELPhotoBrowser.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELPhotoBrowser.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/22.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "XLPhotoBrowser.h"
10 | #import "ELNewsDetailPageBean.h"
11 |
12 | @interface ELPhotoBrowser : XLPhotoBrowser
13 |
14 | @property (nonatomic, strong) ELNewsPhotoDetailPageBean *photoDetailPageBean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Video/Controller/ELVideoDetailViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELVideoDetailViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/25.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELBaseViewController.h"
10 |
11 | @interface ELVideoDetailViewController : ELBaseViewController
12 |
13 | @property (nonatomic, assign) NSInteger newsID;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Video/Controller/ELVideoViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELVideoViewController.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELDisplayViewController.h"
10 |
11 | @interface ELVideoViewController : ELDisplayViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Video/Controller/ELVideoViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELVideoViewController.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELVideoViewController.h"
10 | #import "ELHomeChannelViewModel.h"
11 | #import "ELNewsPageViewController.h"
12 |
13 | #import "ELVideoNode.h"
14 | @interface ELVideoViewController ()
15 |
16 | @end
17 |
18 | @implementation ELVideoViewController{
19 | ELHomeChannelViewModel *_channelViewModel;
20 | }
21 |
22 | #pragma mark – LifeCycle
23 | - (void)viewDidLoad{
24 | [super viewDidLoad];
25 |
26 | self.baseTitle = @"视频";
27 | }
28 |
29 | - (void)viewWillAppear:(BOOL)animated{
30 | [self.navigationController setNavigationBarHidden:YES animated:NO];
31 | [super viewWillAppear:animated];
32 |
33 | [self initData];
34 | }
35 |
36 | #pragma mark - Intial Methods
37 | - (void)initData{
38 | _channelViewModel = [ELHomeChannelViewModel shareInstance];
39 |
40 | if (_channelViewModel.channelBean.video.count == 0) {
41 | [_channelViewModel loadDataFromNetwork];
42 |
43 | } else {
44 | [self setUpAllViewController];
45 | }
46 |
47 | @weakify(self);
48 | [[_channelViewModel.requestCommand execute:nil] subscribeNext:^(id x) {
49 | @strongify(self);
50 | [self setUpAllViewController];
51 | } error:^(NSError *error) {
52 |
53 | }];
54 |
55 | }
56 |
57 | #pragma mark – Target Methods
58 |
59 | #pragma mark - Private Methods
60 | // 添加所有子控制器
61 | - (void)setUpAllViewController{
62 | [[_channelViewModel.channelBean.video.rac_sequence.signal deliverOnMainThread] subscribeNext:^(ELSingleChannelBean *bean) {
63 | ELFeedViewModel *viewModel = [[ELFeedViewModel alloc] initWithELSingleChannelBean:bean];
64 | viewModel.tabType = ELTabTypeVideo;
65 | ELNewsPageViewController *newsPageVc = [[ELNewsPageViewController alloc] initWithViewModel:viewModel];
66 | newsPageVc.delegate = self;
67 | [self addChildViewController:newsPageVc];
68 | } completed:^{
69 | [self refreshDisplay];
70 | }];
71 | //// for (NSInteger i = 0; i < _channelViewModel.channelBean.video.count; i++) {
72 | //// ELSingleChannelBean *bean = [_channelViewModel.channelBean.video safeObjectAtIndex:i];
73 | //// ELNewsPageViewController *newsPageVc = [[ELNewsPageViewController alloc] init];
74 | //// newsPageVc.delegate = self;
75 | //// newsPageVc.title = bean.name;
76 | //// newsPageVc.singleChannelBean = bean;
77 | //// newsPageVc.tabType = ELTabTypeVideo;
78 | //// [self addChildViewController:newsPageVc];
79 | //// }
80 | //
81 | // [self refreshDisplay];
82 |
83 | }
84 |
85 | #pragma mark - Setter Getter Methods
86 |
87 | #pragma mark - External Delegate
88 |
89 |
90 |
91 | @end
92 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Video/Model/ELVideoListBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELVideoListBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELVideoListBean : NSObject
12 |
13 | @property (nonatomic, assign) NSInteger videoID;
14 | @property (nonatomic, strong) NSString *title;
15 | @property (nonatomic, strong) NSString *pic;
16 | @property (nonatomic, strong) NSString *urlroute;
17 |
18 | - (NSAttributedString *)titleAttributedStringWithFontSize:(CGFloat)size;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Video/Model/ELVideoListBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELVideoListBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELVideoListBean.h"
10 |
11 | @implementation ELVideoListBean
12 |
13 | + (NSDictionary *)modelCustomPropertyMapper{
14 | return @{
15 | @"videoID" : @"id"
16 | };
17 | }
18 |
19 | - (NSAttributedString *)titleAttributedStringWithFontSize:(CGFloat)size{
20 | return [NSAttributedString attributedStringWithString:self.title
21 | fontSize:size
22 | color:[UIColor hexChangeFloat:@"333333"]
23 | firstWordColor:nil];
24 | }
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Video/Model/ELVideoPageBean.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELVideoPageBean.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELVideoPageBean : NSObject
12 |
13 | @property (nonatomic, strong) NSArray *list;
14 | @property (nonatomic, assign) NSInteger page;
15 | @property (nonatomic, assign) long ts;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Video/Model/ELVideoPageBean.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELVideoPageBean.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELVideoPageBean.h"
10 | #import "ELVideoListBean.h"
11 |
12 | @implementation ELVideoPageBean
13 |
14 | + (nullable NSDictionary *)modelContainerPropertyGenericClass{
15 | return @{
16 | @"list" : ELVideoListBean.class
17 | };
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Video/View/ELVideoDetailContentNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELVideoDetailContentNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/25.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELVideoDetailContentNode : ASCellNode
12 |
13 | - (instancetype)initWithTitle:(NSString *)title;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Video/View/ELVideoDetailContentNode.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELVideoDetailContentNode.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/25.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import "ELVideoDetailContentNode.h"
10 |
11 | @implementation ELVideoDetailContentNode{
12 | ASTextNode *_titleNode;
13 | }
14 |
15 | - (instancetype)initWithTitle:(NSString *)title{
16 | if (self = [super init]) {
17 | self.selectionStyle = UITableViewCellSelectionStyleNone;
18 |
19 | _titleNode = [[ASTextNode alloc] init];
20 | _titleNode.attributedText = [NSAttributedString attributedStringWithString:title
21 | fontSize:19
22 | color:[UIColor hexChangeFloat:@"333333"]
23 | firstWordColor:nil];
24 | [self addSubnode:_titleNode];
25 | }
26 | return self;
27 | }
28 |
29 | - (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize{
30 | ASInsetLayoutSpec *contentInsetSpec = [ASInsetLayoutSpec insetLayoutSpecWithInsets:UIEdgeInsetsMake(10, 20, 10, 20)
31 | child:_titleNode];
32 | return contentInsetSpec;
33 | }
34 | @end
35 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Main/Video/View/ELVideoNode.h:
--------------------------------------------------------------------------------
1 | //
2 | // ELVideoNode.h
3 | // ELENews
4 | //
5 | // Created by EL on 2017/12/14.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELVideoListBean.h"
11 |
12 | @interface ELVideoNode : ASCellNode
13 |
14 | - (instancetype)initWithVideoListBean:(ELVideoListBean *)videoListBean;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_comment_20x20_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_comment_20x20_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_comment_20x20_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_comment_20x20_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_dabang_14x14_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_dabang_14x14_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_dabang_14x14_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_dabang_14x14_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_discover_activity_14x15_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_discover_activity_14x15_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_discover_activity_14x15_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_discover_activity_14x15_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_discover_cat_14x15_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_discover_cat_14x15_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_discover_cat_14x15_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_discover_cat_14x15_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_discover_idolAdd_70x70_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_discover_idolAdd_70x70_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_discover_idolAdd_70x70_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_discover_idolAdd_70x70_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_discover_idol_14x14_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_discover_idol_14x14_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_discover_idol_14x14_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_discover_idol_14x14_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_discover_topic_14x15_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_discover_topic_14x15_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_discover_topic_14x15_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_discover_topic_14x15_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_fast_40x11_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_fast_40x11_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_fast_40x11_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_fast_40x11_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_share_20x20_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_share_20x20_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_share_20x20_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_share_20x20_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_smallJuzi_20x20_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_smallJuzi_20x20_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_smallJuzi_20x20_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_smallJuzi_20x20_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_star_topShadow_110x90_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_star_topShadow_110x90_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_star_topShadow_110x90_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_star_topShadow_110x90_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_stars_fastBottom_110x28_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_stars_fastBottom_110x28_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_stars_fastBottom_110x28_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_stars_fastBottom_110x28_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_stars_todayBottom_110x28_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_stars_todayBottom_110x28_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_stars_todayBottom_110x28_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_stars_todayBottom_110x28_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_stars_weekBottom_110x28_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_stars_weekBottom_110x28_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_stars_weekBottom_110x28_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_stars_weekBottom_110x28_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_today_49x11_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_today_49x11_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_today_49x11_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_today_49x11_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_topicName_20x20_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_topicName_20x20_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_topicName_20x20_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_topicName_20x20_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_week_49x11_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_week_49x11_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/community_week_49x11_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/community_week_49x11_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/video_arrow_7x11_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/video_arrow_7x11_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Community/video_arrow_7x11_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Community/video_arrow_7x11_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Home/home_nav_logo_91x26_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Home/home_nav_logo_91x26_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Home/home_nav_logo_91x26_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Home/home_nav_logo_91x26_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Home/person_arrow_9x5_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Home/person_arrow_9x5_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Home/person_arrow_9x5_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Home/person_arrow_9x5_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Home/person_arrow_up_9x5_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Home/person_arrow_up_9x5_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Home/person_arrow_up_9x5_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Home/person_arrow_up_9x5_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_background_os7_1x44_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_background_os7_1x44_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_community_normal_40x40_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_community_normal_40x40_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_community_normal_40x40_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_community_normal_40x40_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_community_selected_40x40_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_community_selected_40x40_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_community_selected_40x40_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_community_selected_40x40_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_home_refresh_40x40_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_home_refresh_40x40_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_home_refresh_40x40_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_home_refresh_40x40_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_index_normal_40x40_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_index_normal_40x40_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_index_normal_40x40_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_index_normal_40x40_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_index_selected_40x40_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_index_selected_40x40_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_index_selected_40x40_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_index_selected_40x40_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_me_normal_40x40_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_me_normal_40x40_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_me_normal_40x40_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_me_normal_40x40_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_me_selected_40x40_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_me_selected_40x40_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_me_selected_40x40_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_me_selected_40x40_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_video_normal_40x40_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_video_normal_40x40_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_video_normal_40x40_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_video_normal_40x40_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_video_selected_40x40_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_video_selected_40x40_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Main/tabbar_video_selected_40x40_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Main/tabbar_video_selected_40x40_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Other/black_circle_back_33x33_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Other/black_circle_back_33x33_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Other/black_circle_back_33x33_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Other/black_circle_back_33x33_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Other/photo_gallary_back_35x35_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Other/photo_gallary_back_35x35_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Other/photo_gallary_back_35x35_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Other/photo_gallary_back_35x35_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Other/placehoderImg_145x108_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Other/placehoderImg_145x108_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Other/placehoderImg_145x108_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Other/placehoderImg_145x108_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Video/video_play_54x54_@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Video/video_play_54x54_@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Resource/Image/Video/video_play_54x54_@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Resource/Image/Video/video_play_54x54_@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/View/FastForwardView.h:
--------------------------------------------------------------------------------
1 | //
2 | // FastForwardView.h
3 | // WMPlayer
4 | //
5 | // Created by 郑文明 on 16/10/26.
6 | // Copyright © 2016年 郑文明. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FastForwardView : UIView
12 | @property (weak, nonatomic) IBOutlet UIImageView *sheetStateImageView;
13 | @property (weak, nonatomic) IBOutlet UILabel *sheetTimeLabel;
14 | @end
15 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/View/FastForwardView.m:
--------------------------------------------------------------------------------
1 | //
2 | // FastForwardView.m
3 | // WMPlayer
4 | //
5 | // Created by 郑文明 on 16/10/26.
6 | // Copyright © 2016年 郑文明. All rights reserved.
7 | //
8 |
9 | #import "FastForwardView.h"
10 |
11 | @implementation FastForwardView
12 |
13 | /*
14 | // Only override drawRect: if you perform custom drawing.
15 | // An empty implementation adversely affects performance during animation.
16 | - (void)drawRect:(CGRect)rect {
17 | // Drawing code
18 | }
19 | */
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/View/WMLightView.h:
--------------------------------------------------------------------------------
1 | //
2 | // WMLightView.h
3 | // WMPlayer
4 | //
5 | // Created by 郑文明 on 16/10/26.
6 | // Copyright © 2016年 郑文明. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface WMLightView : UIView
12 | @property (strong, nonatomic) UIView *lightBackView;
13 | @property (strong, nonatomic) UIImageView *centerLightIV;
14 |
15 | @property (nonatomic, strong) NSMutableArray * lightViewArr;
16 |
17 | + (instancetype)sharedLightView;
18 | @end
19 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/WMPlayerBackground@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/WMPlayerBackground@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/WMPlayerBackground@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/WMPlayerBackground@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/ba_back@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/ba_back@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/ba_back@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/ba_back@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/bottom_shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/bottom_shadow.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/close@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/close@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/close@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/close@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/dot@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/dot@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/dot@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/dot@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/fullscreen@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/fullscreen@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/fullscreen@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/fullscreen@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/nonfullscreen@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/nonfullscreen@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/nonfullscreen@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/nonfullscreen@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/pause@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/pause@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/pause@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/pause@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play_back.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play_new_brightness_day.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play_new_brightness_day.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play_new_brightness_day@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play_new_brightness_day@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play_new_brightness_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play_new_brightness_night.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play_new_brightness_night@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/play_new_brightness_night@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/progress_icon_l.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/progress_icon_l.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/progress_icon_l@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/progress_icon_l@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/progress_icon_r.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/progress_icon_r.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/progress_icon_r@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/progress_icon_r@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/top_shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/top_shadow.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/全屏@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/全屏@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/全屏@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/全屏@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/播放@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/播放@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/播放@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/播放@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/播放显示@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/播放显示@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/播放显示@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/播放显示@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/暂停@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/暂停@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/暂停@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/暂停@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/返回@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/返回@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/返回@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/WMPlayer/WMPlayer.bundle/返回@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/UIImage+XLExtension.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+XLExtension.h
3 | // XLPhotoBrowserDemo
4 | //
5 | // Created by ehang on 2016/10/26.
6 | // Copyright © 2016年 LiuShannoon. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImage (XLExtension)
12 |
13 | /**
14 | * 返回一张指定size的指定颜色的纯色图片
15 | */
16 | + (UIImage *)xl_imageWithColor:(UIColor *)color size:(CGSize)size;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/UIImage+XLExtension.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+XLExtension.m
3 | // XLPhotoBrowserDemo
4 | //
5 | // Created by ehang on 2016/10/26.
6 | // Copyright © 2016年 LiuShannoon. All rights reserved.
7 | //
8 |
9 | #import "UIImage+XLExtension.h"
10 |
11 | @implementation UIImage (XLExtension)
12 |
13 | /**
14 | * 返回一张指定size的指定颜色的纯色图片
15 | */
16 | + (UIImage *)xl_imageWithColor:(UIColor *)color size:(CGSize)size
17 | {
18 | if (size.width <= 0 ) {
19 | size = CGSizeMake(3, 3);
20 | }
21 | CGRect rect = CGRectMake(0, 0, size.width, size.height);
22 | UIGraphicsBeginImageContext(rect.size);
23 | CGContextRef context = UIGraphicsGetCurrentContext();
24 |
25 | CGContextSetFillColorWithColor(context, [color CGColor]);
26 | CGContextFillRect(context, rect);
27 |
28 | UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
29 | UIGraphicsEndImageContext();
30 |
31 | return image;
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/FSActionSheet/FSActionSheet.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSActionSheet.h
3 | // FSActionSheet
4 | //
5 | // Created by Steven on 6/7/16.
6 | // Copyright © 2016年 Steven. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FSActionSheetItem.h"
11 | #import "FSActionSheetConfig.h"
12 |
13 | @class FSActionSheet;
14 | @protocol FSActionSheetDelegate
15 |
16 | @optional
17 | - (void)FSActionSheet:(FSActionSheet *)actionSheet selectedIndex:(NSInteger)selectedIndex;
18 |
19 | @end
20 |
21 | @interface FSActionSheet : UIView
22 |
23 | @property (nonatomic, weak) id delegate; ///< 代理对象
24 | @property (nonatomic, assign) FSContentAlignment contentAlignment; ///< 默认是FSContentAlignmentCenter.
25 | @property (nonatomic, assign) BOOL hideOnTouchOutside; ///< 是否开启点击半透明层隐藏弹窗, 默认为YES.
26 |
27 | /*! @author Steven
28 | * @brief 单文本选项快速初始化
29 | * @param title 标题
30 | * @param delegate 代理
31 | * @param cancelButtonTitle 取消按钮标题
32 | * @param highlightedButtonTitle 高亮按钮标题
33 | * @param otherButtonTitles 其他按钮标题集合
34 | */
35 | - (instancetype)initWithTitle:(NSString *)title delegate:(id)delegate cancelButtonTitle:(NSString *)cancelButtonTitle highlightedButtonTitle:(NSString *)highlightedButtonTitle otherButtonTitles:(NSArray *)otherButtonTitles;
36 | /*! @author Steven
37 | * @brief 单文本选项快速初始化
38 | * @param title 标题
39 | * @param delegate 代理
40 | * @param cancelButtonTitle 取消按钮标题
41 | * @param highlightedButtonTitle 高亮按钮标题
42 | * @param otherButtonTitles 其他按钮标题集合
43 | * @param sourceWindow 展示的目标窗口,如果不传递,内部会自动创建一个window
44 | */
45 | - (instancetype)initWithTitle:(NSString *)title delegate:(id)delegate cancelButtonTitle:(NSString *)cancelButtonTitle highlightedButtonTitle:(NSString *)highlightedButtonTitle otherButtonTitles:(NSArray *)otherButtonTitles sourceWindow:(UIWindow *)sourceWindow;
46 | /*! @author Steven
47 | * @brief 在外部组装选项按钮item
48 | * @param title 标题
49 | * @param cancelTitle 取消按钮标题
50 | * @param items 选项按钮item
51 | */
52 | - (instancetype)initWithTitle:(NSString *)title cancelTitle:(NSString *)cancelTitle items:(NSArray *)items;
53 |
54 | /*! @author Steven
55 | * @brief 单展示, 不绑定block回调
56 | */
57 | - (void)show;
58 |
59 | /*! @author Steven
60 | * @brief 展示并绑定block回调
61 | * @param selectedHandler 选择选项按钮回调.
62 | */
63 | - (void)showWithSelectedCompletion:(FSActionSheetHandler)selectedHandler;
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/FSActionSheet/FSActionSheetCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSActionSheetCell.h
3 | // FSActionSheet
4 | //
5 | // Created by Steven on 6/7/16.
6 | // Copyright © 2016年 Steven. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FSActionSheetConfig.h"
11 | @class FSActionSheetItem;
12 |
13 | @interface FSActionSheetCell : UITableViewCell
14 |
15 | @property (nonatomic, assign) FSContentAlignment contentAlignment;
16 | @property (nonatomic, strong) FSActionSheetItem *item;
17 | @property (nonatomic, assign) BOOL hideTopLine; ///< 是否隐藏顶部线条
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/FSActionSheet/FSActionSheetConfig.m:
--------------------------------------------------------------------------------
1 | //
2 | // FSActionSheetConfig.m
3 | // FSActionSheet
4 | //
5 | // Created by Steven on 6/8/16.
6 | // Copyright © 2016 Steven. All rights reserved.
7 | //
8 |
9 | #import "FSActionSheetConfig.h"
10 |
11 | // float
12 | CGFloat const FSActionSheetDefaultMargin = 10; ///< 默认边距 (标题四边边距, 选项靠左或靠右时距离边缘的距离)
13 | CGFloat const FSActionSheetContentMaxScale = 0.65; ///< 弹窗内容高度与屏幕高度的默认比例
14 | CGFloat const FSActionSheetRowHeight = 44; ///< 行高
15 | CGFloat const FSActionSheetTitleLineSpacing = 2.5; ///< 标题行距
16 | CGFloat const FSActionSheetTitleKernSpacing = 0.5; ///< 标题字距
17 | CGFloat const FSActionSheetItemTitleFontSize = 16; ///< 选项文字字体大小, default is 16.
18 | CGFloat const FSActionSheetItemContentSpacing = 5; ///< 选项图片和文字的间距
19 | // color
20 | NSString * const FSActionSheetTitleColor = @"#888888"; ///< 标题颜色
21 | NSString * const FSActionSheetBackColor = @"#E8E8ED"; ///< 背景颜色
22 | NSString * const FSActionSheetRowNormalColor = @"#FBFBFE"; ///< 单元格背景颜色
23 | NSString * const FSActionSheetRowHighlightedColor = @"#F1F1F5"; ///< 选中高亮颜色
24 | NSString * const FSActionSheetRowTopLineColor = @"#D7D7D8"; ///< 单元格顶部线条颜色
25 | NSString * const FSActionSheetItemNormalColor = @"#000000"; ///< 选项默认颜色
26 | NSString * const FSActionSheetItemHighlightedColor = @"#E64340"; ///< 选项高亮颜色
27 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/FSActionSheet/FSActionSheetItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // FSActionSheetItem.h
3 | // FSActionSheet
4 | //
5 | // Created by Steven on 16/5/11.
6 | // Copyright © 2016年 Steven. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "FSActionSheetConfig.h"
11 |
12 | @interface FSActionSheetItem : NSObject
13 |
14 | @property (nonatomic, assign) FSActionSheetType type; ///< 选项类型, 有 默认 和 高亮 两种类型.
15 | @property (nonatomic, strong) UIImage *image; ///< 选项图标, 建议image的size为 @2x: 46x46, @3x: 69x69.
16 | @property (nonatomic, copy) NSString *title; ///< 选项标题
17 | @property (nonatomic, strong) UIColor *tintColor; ///< 选项前景色, 如果设置了这个颜色的话, 则无论选项设置的图标是什么颜色都会被修改为当前设置的这个颜色,
18 | ///< 同时这个颜色也会是标题的文本颜色.
19 |
20 | + (instancetype)itemWithType:(FSActionSheetType)type image:(UIImage *)image title:(NSString *)title tintColor:(UIColor *)tintColor;
21 |
22 | @end
23 |
24 | /*! @author Steven
25 | * @brief 单标题的选项
26 | * @param type 类型
27 | * @param title 标题
28 | */
29 | NS_INLINE FSActionSheetItem *FSActionSheetTitleItemMake(FSActionSheetType type, NSString *title) {
30 | return [FSActionSheetItem itemWithType:type image:nil title:title tintColor:nil];
31 | }
32 |
33 | /*! @author Steven
34 | * @brief 标题和图标的选项
35 | * @param type 类型
36 | * @param image 图片
37 | * @param title 标题
38 | */
39 | NS_INLINE FSActionSheetItem *FSActionSheetTitleWithImageItemMake(FSActionSheetType type, UIImage *image, NSString *title) {
40 | return [FSActionSheetItem itemWithType:type image:image title:title tintColor:nil];
41 | }
42 |
43 | /*! @author Steven
44 | * @brief 单标题且自定义前景色的选项
45 | * @param type 类型
46 | * @param title 标题
47 | * @param tintColor 自定义前景色
48 | */
49 | NS_INLINE FSActionSheetItem *FSActionSheetTitleWithColorItemMake(FSActionSheetType type, NSString *title, UIColor *tintColor) {
50 | return [FSActionSheetItem itemWithType:type image:nil title:title tintColor:tintColor];
51 | }
52 |
53 | /*! @author Steven
54 | * @brief 标题和图片并且自定义前景色的选项
55 | * @param type 类型
56 | * @param title 标题
57 | * @param image 图片
58 | * @param tintColor 自定义前景色
59 | */
60 | NS_INLINE FSActionSheetItem *FSActionSheetItemMake(FSActionSheetType type, UIImage *image, NSString *title, UIColor *tintColor) {
61 | return [FSActionSheetItem itemWithType:type image:image title:title tintColor:tintColor];
62 | }
63 |
64 |
65 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/FSActionSheet/FSActionSheetItem.m:
--------------------------------------------------------------------------------
1 | //
2 | // FSActionSheetItem.m
3 | // FSActionSheet
4 | //
5 | // Created by Steven on 16/5/11.
6 | // Copyright © 2016年 Steven. All rights reserved.
7 | //
8 |
9 | #import "FSActionSheetItem.h"
10 |
11 | @implementation FSActionSheetItem
12 |
13 | + (instancetype)itemWithType:(FSActionSheetType)type image:(UIImage *)image title:(NSString *)title tintColor:(UIColor *)tintColor {
14 |
15 | FSActionSheetItem *item = [[FSActionSheetItem alloc] init];
16 | item.type = type;
17 | item.image = image;
18 | item.title = title;
19 | item.tintColor = tintColor;
20 |
21 | return item;
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/FSActionSheet/FSActionSheetResources/FSActionSheet_cancel@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/FSActionSheet/FSActionSheetResources/FSActionSheet_cancel@2x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/FSActionSheet/FSActionSheetResources/FSActionSheet_cancel@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ElegantLiar/ELEnews/417e215d9f55bc96e03348fc51e8462aaf3c3ff3/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/FSActionSheet/FSActionSheetResources/FSActionSheet_cancel@3x.png
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/PageControl/TAAbstractDotView.h:
--------------------------------------------------------------------------------
1 | //
2 | // TAAbstractDotView.h
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface TAAbstractDotView : UIView
13 |
14 |
15 | /**
16 | * A method call let view know which state appearance it should take. Active meaning it's current page. Inactive not the current page.
17 | *
18 | * @param active BOOL to tell if view is active or not
19 | */
20 | - (void)changeActivityState:(BOOL)active;
21 |
22 |
23 | @end
24 |
25 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/PageControl/TAAbstractDotView.m:
--------------------------------------------------------------------------------
1 | //
2 | // TAAbstractDotView.m
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import "TAAbstractDotView.h"
10 |
11 |
12 | @implementation TAAbstractDotView
13 |
14 |
15 | - (id)init
16 | {
17 | @throw [NSException exceptionWithName:NSInternalInconsistencyException
18 | reason:[NSString stringWithFormat:@"You must override %@ in %@", NSStringFromSelector(_cmd), self.class]
19 | userInfo:nil];
20 | }
21 |
22 |
23 | - (void)changeActivityState:(BOOL)active
24 | {
25 | @throw [NSException exceptionWithName:NSInternalInconsistencyException
26 | reason:[NSString stringWithFormat:@"You must override %@ in %@", NSStringFromSelector(_cmd), self.class]
27 | userInfo:nil];
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/PageControl/TAAnimatedDotView.h:
--------------------------------------------------------------------------------
1 | //
2 | // TAAnimatedDotView.h
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import "TAAbstractDotView.h"
10 |
11 | @interface TAAnimatedDotView : TAAbstractDotView
12 |
13 | @property (nonatomic, strong) UIColor *dotColor;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/PageControl/TAAnimatedDotView.m:
--------------------------------------------------------------------------------
1 | //
2 | // TAAnimatedDotView.m
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import "TAAnimatedDotView.h"
10 |
11 | static CGFloat const kAnimateDuration = 1;
12 |
13 | @implementation TAAnimatedDotView
14 |
15 | - (instancetype)init
16 | {
17 | self = [super init];
18 | if (self) {
19 | [self initialization];
20 | }
21 |
22 | return self;
23 | }
24 |
25 |
26 | - (id)initWithFrame:(CGRect)frame
27 | {
28 | self = [super initWithFrame:frame];
29 | if (self) {
30 | [self initialization];
31 | }
32 | return self;
33 | }
34 |
35 |
36 | - (id)initWithCoder:(NSCoder *)aDecoder
37 | {
38 | self = [super initWithCoder:aDecoder];
39 | if (self) {
40 | [self initialization];
41 | }
42 |
43 | return self;
44 | }
45 |
46 | - (void)setDotColor:(UIColor *)dotColor
47 | {
48 | _dotColor = dotColor;
49 | self.layer.borderColor = dotColor.CGColor;
50 | }
51 |
52 | - (void)initialization
53 | {
54 | _dotColor = [UIColor whiteColor];
55 | self.backgroundColor = [UIColor clearColor];
56 | self.layer.cornerRadius = CGRectGetWidth(self.frame) / 2;
57 | self.layer.borderColor = [UIColor whiteColor].CGColor;
58 | self.layer.borderWidth = 1;
59 | }
60 |
61 |
62 | - (void)changeActivityState:(BOOL)active
63 | {
64 | if (active) {
65 | [self animateToActiveState];
66 | } else {
67 | [self animateToDeactiveState];
68 | }
69 | }
70 |
71 | static CGFloat damping = 0.25;
72 |
73 | - (void)animateToActiveState
74 | {
75 | [UIView animateWithDuration:kAnimateDuration delay:0 usingSpringWithDamping:damping initialSpringVelocity:-20 options:UIViewAnimationOptionCurveLinear animations:^{
76 | self.backgroundColor = _dotColor;
77 | self.transform = CGAffineTransformMakeScale(1.4, 1.4);
78 | } completion:nil];
79 | }
80 |
81 | - (void)animateToDeactiveState
82 | {
83 | [UIView animateWithDuration:kAnimateDuration delay:0 usingSpringWithDamping:damping initialSpringVelocity:0 options:UIViewAnimationOptionCurveLinear animations:^{
84 | self.backgroundColor = [UIColor clearColor];
85 | self.transform = CGAffineTransformIdentity;
86 | } completion:nil];
87 | }
88 |
89 | @end
90 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/PageControl/TADotView.h:
--------------------------------------------------------------------------------
1 | //
2 | // TADotView.h
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import "TAAbstractDotView.h"
10 |
11 | @interface TADotView : TAAbstractDotView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/PageControl/TADotView.m:
--------------------------------------------------------------------------------
1 | //
2 | // TADotView.m
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-22.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import "TADotView.h"
10 |
11 | @implementation TADotView
12 |
13 |
14 | - (instancetype)init
15 | {
16 | self = [super init];
17 | if (self) {
18 | [self initialization];
19 | }
20 |
21 | return self;
22 | }
23 |
24 |
25 | - (id)initWithFrame:(CGRect)frame
26 | {
27 | self = [super initWithFrame:frame];
28 | if (self) {
29 | [self initialization];
30 | }
31 | return self;
32 | }
33 |
34 |
35 | - (id)initWithCoder:(NSCoder *)aDecoder
36 | {
37 | self = [super initWithCoder:aDecoder];
38 | if (self) {
39 | [self initialization];
40 | }
41 |
42 | return self;
43 | }
44 |
45 | - (void)initialization
46 | {
47 | self.backgroundColor = [UIColor clearColor];
48 | self.layer.cornerRadius = CGRectGetWidth(self.frame) / 2;
49 | self.layer.borderColor = [UIColor whiteColor].CGColor;
50 | self.layer.borderWidth = 1;
51 | }
52 |
53 |
54 | - (void)changeActivityState:(BOOL)active
55 | {
56 | if (active) {
57 | self.backgroundColor = [UIColor whiteColor];
58 | } else {
59 | self.backgroundColor = [UIColor clearColor];
60 | }
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/Vender/PageControl/TAPageControl.h:
--------------------------------------------------------------------------------
1 | //
2 | // TAPageControl.h
3 | // TAPageControl
4 | //
5 | // Created by Tanguy Aladenise on 2015-01-21.
6 | // Copyright (c) 2015 Tanguy Aladenise. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol TAPageControlDelegate;
12 |
13 |
14 | @interface TAPageControl : UIControl
15 |
16 |
17 | /**
18 | * Dot view customization properties
19 | */
20 |
21 | /**
22 | * The Class of your custom UIView, make sure to respect the TAAbstractDotView class.
23 | */
24 | @property (nonatomic) Class dotViewClass;
25 |
26 |
27 | /**
28 | * UIImage to represent a dot.
29 | */
30 | @property (nonatomic) UIImage *dotImage;
31 |
32 |
33 | /**
34 | * UIImage to represent current page dot.
35 | */
36 | @property (nonatomic) UIImage *currentDotImage;
37 |
38 |
39 | /**
40 | * Dot size for dot views. Default is 8 by 8.
41 | */
42 | @property (nonatomic) CGSize dotSize;
43 |
44 |
45 | @property (nonatomic, strong) UIColor *dotColor;
46 |
47 | /**
48 | * Spacing between two dot views. Default is 8.
49 | */
50 | @property (nonatomic) NSInteger spacingBetweenDots;
51 |
52 |
53 | /**
54 | * Page control setup properties
55 | */
56 |
57 |
58 | /**
59 | * Delegate for TAPageControl
60 | */
61 | @property(nonatomic,assign) id delegate;
62 |
63 |
64 | /**
65 | * Number of pages for control. Default is 0.
66 | */
67 | @property (nonatomic) NSInteger numberOfPages;
68 |
69 |
70 | /**
71 | * Current page on which control is active. Default is 0.
72 | */
73 | @property (nonatomic) NSInteger currentPage;
74 |
75 |
76 | /**
77 | * Hide the control if there is only one page. Default is NO.
78 | */
79 | @property (nonatomic) BOOL hidesForSinglePage;
80 |
81 |
82 | /**
83 | * Let the control know if should grow bigger by keeping center, or just get longer (right side expanding). By default YES.
84 | */
85 | @property (nonatomic) BOOL shouldResizeFromCenter;
86 |
87 |
88 | /**
89 | * Return the minimum size required to display control properly for the given page count.
90 | *
91 | * @param pageCount Number of dots that will require display
92 | *
93 | * @return The CGSize being the minimum size required.
94 | */
95 | - (CGSize)sizeForNumberOfPages:(NSInteger)pageCount;
96 |
97 |
98 | @end
99 |
100 |
101 | @protocol TAPageControlDelegate
102 |
103 | @optional
104 | - (void)TAPageControl:(TAPageControl *)pageControl didSelectPageAtIndex:(NSInteger)index;
105 |
106 | @end
107 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/XLPhotoBrowserConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLPhotoBrowserConfig.h
3 | // XLPhotoBrowserDemo
4 | //
5 | // Created by Liushannoon on 16/7/16.
6 | // Copyright © 2016年 LiuShannoon. All rights reserved.
7 | //
8 |
9 | #import "UIView+XLExtension.h"
10 | #import "UIImage+XLExtension.h"
11 | #import "XLPhotoBrowserTypeDefine.h"
12 |
13 | #import "YYWebImage.h"
14 |
15 | #define XLPhotoBrowserDebug 1
16 | //是否开启断言调试模式
17 | #define IsOpenAssertDebug 1
18 | #define XLPhotoBrowserVersion @"1.2.0"
19 |
20 | /**
21 | * 进度视图类型类型
22 | */
23 | typedef NS_ENUM(NSUInteger, XLProgressViewMode){
24 | /**
25 | * 圆环形
26 | */
27 | XLProgressViewModeLoopDiagram = 1,
28 | /**
29 | * 圆饼型
30 | */
31 | XLProgressViewModePieDiagram = 2
32 | };
33 |
34 | // 图片保存成功提示文字
35 | #define XLPhotoBrowserSaveImageSuccessText @" ^_^ 保存成功 ";
36 | // 图片保存失败提示文字
37 | #define XLPhotoBrowserSaveImageFailText @" >_< 保存失败 ";
38 | // 网络图片加载失败的提示文字
39 | #define XLPhotoBrowserLoadNetworkImageFail @">_< 图片加载失败"
40 | #define XLPhotoBrowserLoadingImageText @" >_< 图片加载中,请稍后 ";
41 |
42 | // browser背景颜色
43 | #define XLPhotoBrowserBackgrounColor [UIColor colorWithRed:0 green:0 blue:0 alpha:0.95]
44 | // browser 图片间的margin
45 | #define XLPhotoBrowserImageViewMargin 10
46 | // browser中显示图片动画时长
47 | #define XLPhotoBrowserShowImageAnimationDuration 0.4f
48 | // browser中显示图片动画时长
49 | #define XLPhotoBrowserHideImageAnimationDuration 0.4f
50 |
51 | // 图片下载进度指示进度显示样式(XLProgressViewModeLoopDiagram 环形,XLProgressViewModePieDiagram 饼型)
52 | #define XLProgressViewProgressMode XLProgressViewModeLoopDiagram
53 | // 图片下载进度指示器背景色
54 | #define XLProgressViewBackgroundColor [UIColor clearColor]
55 | // 图片下载进度指示器圆环/圆饼颜色
56 | #define XLProgressViewStrokeColor [UIColor whiteColor]
57 | // 图片下载进度指示器内部控件间的间距
58 | #define XLProgressViewItemMargin 10
59 | // 圆环形图片下载进度指示器 环线宽度
60 | #define XLProgressViewLoopDiagramLineWidth 8
61 |
62 | #define XLPBLog(...) XLFormatLog(__VA_ARGS__)
63 |
64 | #if XLPhotoBrowserDebug
65 | #define XLFormatLog(...)\
66 | {\
67 | NSString *string = [NSString stringWithFormat:__VA_ARGS__];\
68 | NSLog(@"\n===========================\n===========================\n=== XLPhotoBrowser' Log ===\n提示信息:%@\n所在方法:%s\n所在行数:%d\n===========================\n===========================",string,__func__,__LINE__);\
69 | }
70 |
71 | #define XLLogFunc NSLog(@"%s",__func__)
72 |
73 | #else
74 | #define XLFormatLog(...)
75 | #define XLLogFunc
76 | #endif
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/XLPhotoBrowserTypeDefine.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLPhotoBrowserTypeDefine.h
3 | // XLPhotoBrowserDemo
4 | //
5 | // Created by XL on 2017/5/22.
6 | // Copyright © 2017年 LiuShannoon. All rights reserved.
7 | //
8 |
9 | /**
10 | * 图片浏览器的样式
11 | */
12 | typedef NS_ENUM(NSUInteger, XLPhotoBrowserStyle){
13 | /**
14 | * 长按图片弹出功能组件,底部一个PageControl
15 | */
16 | XLPhotoBrowserStylePageControl = 1,
17 | /**
18 | * 长按图片弹出功能组件,顶部一个索引UILabel
19 | */
20 | XLPhotoBrowserStyleIndexLabel = 2,
21 | /**
22 | * 没有长按图片弹出的功能组件,顶部一个索引UILabel,底部一个保存图片按钮
23 | */
24 | XLPhotoBrowserStyleSimple = 3
25 | };
26 |
27 | /**
28 | * pageControl的位置
29 | */
30 | typedef NS_ENUM(NSUInteger, XLPhotoBrowserPageControlAliment){
31 | /**
32 | * pageControl在右边
33 | */
34 | XLPhotoBrowserPageControlAlimentRight = 1,
35 | /**
36 | * pageControl 中间
37 | */
38 | XLPhotoBrowserPageControlAlimentCenter = 2,
39 | XLPhotoBrowserPageControlAlimentLeft = 3
40 | };
41 |
42 | /**
43 | * pageControl的样式
44 | */
45 | typedef NS_ENUM(NSUInteger, XLPhotoBrowserPageControlStyle){
46 | /**
47 | * 系统自带经典样式
48 | */
49 | XLPhotoBrowserPageControlStyleClassic = 1,
50 | /**
51 | * 动画效果pagecontrol
52 | */
53 | XLPhotoBrowserPageControlStyleAnimated = 2,
54 | /**
55 | * 不显示pagecontrol
56 | */
57 | XLPhotoBrowserPageControlStyleNone = 3
58 |
59 | };
60 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/XLProgressView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLProgressView.h
3 | // XLPhotoBrowserDemo
4 | //
5 | // Created by Liushannoon on 16/7/17.
6 | // Copyright © 2016年 LiuShannoon. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "XLPhotoBrowserConfig.h"
11 |
12 | @interface XLProgressView : UIView
13 |
14 | @property (nonatomic, assign) CGFloat progress;
15 | @property (nonatomic, assign) XLProgressViewMode mode;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/XLPhotoBrowser+CoderXL/XLZoomingScrollView.h:
--------------------------------------------------------------------------------
1 | //
2 | // XLZoomingScrollView.h
3 | // XLPhotoBrowserDemo
4 | //
5 | // Created by Liushannoon on 16/7/15.
6 | // Copyright © 2016年 LiuShannoon. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "UIView+XLExtension.h"
11 |
12 | @class XLZoomingScrollView;
13 |
14 | @protocol XLZoomingScrollViewDelegate
15 |
16 | /**
17 | * 单击图像时调用
18 | *
19 | * @param zoomingScrollView 图片缩放视图
20 | * @param singleTap 用户单击手势
21 | */
22 | - (void)zoomingScrollView:(XLZoomingScrollView *)zoomingScrollView singleTapDetected:(UITapGestureRecognizer *)singleTap;
23 |
24 | @optional
25 | /**
26 | * 图片加载进度
27 | *
28 | * @param zoomingScrollView 图片缩放视图
29 | * @param progress 加载进度 , 0 - 1.0
30 | */
31 | - (void)zoomingScrollView:(XLZoomingScrollView *)zoomingScrollView imageLoadProgress:(CGFloat)progress;
32 |
33 | @end
34 |
35 |
36 | @interface XLZoomingScrollView : UIView
37 |
38 | /**
39 | * zoomingScrollViewdelegate
40 | */
41 | @property (nonatomic , weak) id zoomingScrollViewdelegate;
42 | /**
43 | * 图片加载进度
44 | */
45 | @property (nonatomic, assign) CGFloat progress;
46 | /**
47 | * 展示的图片
48 | */
49 | @property (nonatomic , strong , readonly) UIImage *currentImage;
50 | /**
51 | * 展示图片的UIImageView视图 , 回缩的动画用
52 | */
53 | @property (nonatomic , weak , readonly) UIImageView *imageView;
54 | @property (nonatomic , strong , readonly) UIScrollView *scrollview;
55 |
56 | /**
57 | * 显示图片
58 | *
59 | * @param url 图片的高清大图链接
60 | * @param placeholder 占位的缩略图 / 或者是高清大图都可以
61 | */
62 | - (void)setShowHighQualityImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder;
63 | /**
64 | * 显示图片
65 | *
66 | * @param image 图片
67 | */
68 | - (void)setShowImage:(UIImage *)image;
69 | /**
70 | * 调整尺寸
71 | */
72 | - (void)setMaxAndMinZoomScales;
73 | /**
74 | * 重用,清理资源
75 | */
76 | - (void)prepareForReuse;
77 |
78 | @end
79 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/YYFPSLabel/YYFPSLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYFPSLabel.h
3 | // YYKitExample
4 | //
5 | // Created by ibireme on 15/9/3.
6 | // Copyright (c) 2015 ibireme. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /**
12 | Show Screen FPS...
13 |
14 | The maximum fps in OSX/iOS Simulator is 60.00.
15 | The maximum fps on iPhone is 59.97.
16 | The maxmium fps on iPad is 60.0.
17 | */
18 | @interface YYFPSLabel : UILabel
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/YYFPSLabel/YYWeakProxy.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYWeakProxy.h
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/18.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | A proxy used to hold a weak object.
18 | It can be used to avoid retain cycles, such as the target in NSTimer or CADisplayLink.
19 |
20 | sample code:
21 |
22 | @implementation MyView {
23 | NSTimer *_timer;
24 | }
25 |
26 | - (void)initTimer {
27 | YYWeakProxy *proxy = [YYWeakProxy proxyWithTarget:self];
28 | _timer = [NSTimer timerWithTimeInterval:0.1 target:proxy selector:@selector(tick:) userInfo:nil repeats:YES];
29 | }
30 |
31 | - (void)tick:(NSTimer *)timer {...}
32 | @end
33 | */
34 | @interface YYWeakProxy : NSProxy
35 |
36 | /**
37 | The proxy target.
38 | */
39 | @property (nullable, nonatomic, weak, readonly) id target;
40 |
41 | /**
42 | Creates a new weak proxy for target.
43 |
44 | @param target Target object.
45 |
46 | @return A new proxy object.
47 | */
48 | - (instancetype)initWithTarget:(id)target;
49 |
50 | /**
51 | Creates a new weak proxy for target.
52 |
53 | @param target Target object.
54 |
55 | @return A new proxy object.
56 | */
57 | + (instancetype)proxyWithTarget:(id)target;
58 |
59 | @end
60 |
61 | NS_ASSUME_NONNULL_END
62 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/YYFPSLabel/YYWeakProxy.m:
--------------------------------------------------------------------------------
1 | //
2 | // YYWeakProxy.m
3 | // YYKit
4 | //
5 | // Created by ibireme on 14/10/18.
6 | // Copyright (c) 2015 ibireme.
7 | //
8 | // This source code is licensed under the MIT-style license found in the
9 | // LICENSE file in the root directory of this source tree.
10 | //
11 |
12 | #import "YYWeakProxy.h"
13 |
14 |
15 | @implementation YYWeakProxy
16 |
17 | - (instancetype)initWithTarget:(id)target {
18 | _target = target;
19 | return self;
20 | }
21 |
22 | + (instancetype)proxyWithTarget:(id)target {
23 | return [[YYWeakProxy alloc] initWithTarget:target];
24 | }
25 |
26 | - (id)forwardingTargetForSelector:(SEL)selector {
27 | return _target;
28 | }
29 |
30 | - (void)forwardInvocation:(NSInvocation *)invocation {
31 | void *null = NULL;
32 | [invocation setReturnValue:&null];
33 | }
34 |
35 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector {
36 | return [NSObject instanceMethodSignatureForSelector:@selector(init)];
37 | }
38 |
39 | - (BOOL)respondsToSelector:(SEL)aSelector {
40 | return [_target respondsToSelector:aSelector];
41 | }
42 |
43 | - (BOOL)isEqual:(id)object {
44 | return [_target isEqual:object];
45 | }
46 |
47 | - (NSUInteger)hash {
48 | return [_target hash];
49 | }
50 |
51 | - (Class)superclass {
52 | return [_target superclass];
53 | }
54 |
55 | - (Class)class {
56 | return [_target class];
57 | }
58 |
59 | - (BOOL)isKindOfClass:(Class)aClass {
60 | return [_target isKindOfClass:aClass];
61 | }
62 |
63 | - (BOOL)isMemberOfClass:(Class)aClass {
64 | return [_target isMemberOfClass:aClass];
65 | }
66 |
67 | - (BOOL)conformsToProtocol:(Protocol *)aProtocol {
68 | return [_target conformsToProtocol:aProtocol];
69 | }
70 |
71 | - (BOOL)isProxy {
72 | return YES;
73 | }
74 |
75 | - (NSString *)description {
76 | return [_target description];
77 | }
78 |
79 | - (NSString *)debugDescription {
80 | return [_target debugDescription];
81 | }
82 |
83 | @end
84 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/YZDisplayViewController/UIView+Frame.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Frame.h
3 | // BuDeJie
4 | //
5 | // Created by yz on 15/10/29.
6 | // Copyright © 2015年 yz. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (Frame)
12 |
13 | @property (nonatomic, assign) CGFloat yz_centerX;
14 | @property (nonatomic, assign) CGFloat yz_centerY;
15 |
16 | @property (nonatomic, assign) CGFloat yz_x;
17 | @property (nonatomic, assign) CGFloat yz_y;
18 | @property (nonatomic, assign) CGFloat yz_width;
19 | @property (nonatomic, assign) CGFloat yz_height;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/YZDisplayViewController/UIView+Frame.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Frame.m
3 | // BuDeJie
4 | //
5 | // Created by yz on 15/10/29.
6 | // Copyright © 2015年 yz. All rights reserved.
7 | //
8 |
9 | #import "UIView+Frame.h"
10 |
11 | @implementation UIView (Frame)
12 |
13 | - (CGFloat)yz_height
14 | {
15 | return self.frame.size.height;
16 | }
17 |
18 | - (CGFloat)yz_width
19 | {
20 | return self.frame.size.width;
21 | }
22 |
23 | - (void)setYz_height:(CGFloat)height
24 | {
25 | CGRect frame = self.frame;
26 | frame.size.height = height;
27 | self.frame = frame;
28 | }
29 | - (void)setYz_width:(CGFloat)width
30 | {
31 | CGRect frame = self.frame;
32 | frame.size.width = width;
33 | self.frame = frame;
34 | }
35 |
36 | - (CGFloat)yz_x
37 | {
38 | return self.frame.origin.x;
39 | }
40 |
41 | - (void)setYz_x:(CGFloat)x
42 | {
43 | CGRect frame = self.frame;
44 | frame.origin.x = x;
45 | self.frame = frame;
46 | }
47 |
48 | - (CGFloat)yz_y
49 | {
50 | return self.frame.origin.y;
51 | }
52 |
53 | - (void)setYz_y:(CGFloat)y{
54 | CGRect frame = self.frame;
55 | frame.origin.y = y;
56 | self.frame = frame;
57 | }
58 |
59 | - (void)setYz_centerX:(CGFloat)centerX
60 | {
61 | CGPoint center = self.center;
62 | center.x = centerX;
63 | self.center = center;
64 | }
65 |
66 | - (CGFloat)yz_centerX
67 | {
68 | return self.center.x;
69 | }
70 |
71 | - (void)setYz_centerY:(CGFloat)centerY
72 | {
73 | CGPoint center = self.center;
74 | center.y = centerY;
75 | self.center = center;
76 | }
77 |
78 | - (CGFloat)yz_centerY
79 | {
80 | return self.center.y;
81 | }
82 |
83 | @end
84 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/YZDisplayViewController/YZDisplayTitleLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // YZDisplayTitleLabel.h
3 | // BuDeJie
4 | //
5 | // Created by yz on 15/12/4.
6 | // Copyright © 2015年 yz. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface YZDisplayTitleLabel : UILabel
12 |
13 | @property (nonatomic, assign) CGFloat progress;
14 |
15 | @property (nonatomic, strong) UIColor *fillColor;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/YZDisplayViewController/YZDisplayTitleLabel.m:
--------------------------------------------------------------------------------
1 | //
2 | // YZDisplayTitleLabel.m
3 | // BuDeJie
4 | //
5 | // Created by yz on 15/12/4.
6 | // Copyright © 2015年 yz. All rights reserved.
7 | //
8 |
9 | #import "YZDisplayTitleLabel.h"
10 |
11 | @implementation YZDisplayTitleLabel
12 |
13 | - (void)drawRect:(CGRect)rect
14 | {
15 | [super drawRect:rect];
16 |
17 | [_fillColor set];
18 |
19 | rect.size.width = rect.size.width * _progress;
20 |
21 | UIRectFillUsingBlendMode(rect, kCGBlendModeSourceIn);
22 | }
23 |
24 | - (instancetype)initWithFrame:(CGRect)frame
25 | {
26 | if (self = [super initWithFrame:frame]) {
27 |
28 | self.backgroundColor = [UIColor clearColor];
29 |
30 | self.userInteractionEnabled = YES;
31 |
32 | self.textAlignment = NSTextAlignmentCenter;
33 | }
34 | return self;
35 | }
36 |
37 |
38 | - (void)setProgress:(CGFloat)progress
39 | {
40 | _progress = progress;
41 |
42 | [self setNeedsDisplay];
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/YZDisplayViewController/YZDisplayViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // YZDisplayViewController.h
3 | // BuDeJie
4 | //
5 | // Created by yz on 15/12/1.
6 | // Copyright © 2015年 yz. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ELDisplayViewScrollDelegate.h"
11 |
12 | // 颜色渐变样式
13 | typedef enum : NSUInteger {
14 | YZTitleColorGradientStyleRGB , // RGB:默认RGB样式
15 | YZTitleColorGradientStyleFill, // 填充
16 | } YZTitleColorGradientStyle;
17 |
18 | @interface YZDisplayViewController : UIViewController
19 |
20 | @property (nonatomic, strong) UILabel *titleLabel;
21 | @property (nonatomic, strong) UIImageView *iconImageView;
22 |
23 | /**************************************【内容】************************************/
24 | /**
25 | 内容是否需要全屏展示
26 | YES : 全屏:内容占据整个屏幕,会有穿透导航栏效果,需要手动设置tableView额外滚动区域
27 | NO : 内容从标题下展示
28 | */
29 | @property (nonatomic, assign) BOOL isfullScreen;
30 |
31 | /**
32 | 根据角标,选中对应的控制器
33 | */
34 | @property (nonatomic, assign) NSInteger selectIndex;
35 |
36 | /**
37 | 标题是否需要跟随拖动保持居中
38 | */
39 | @property (nonatomic, assign) BOOL dragingFollow;
40 |
41 | @property (nonatomic, strong) UIView *baseNavigationView;
42 | @property (nonatomic, strong) NSString *baseTitle;
43 |
44 | /**
45 | 如果_isfullScreen = Yes,这个方法就不好使。
46 |
47 | 设置整体内容的frame,包含(标题滚动视图和内容滚动视图)
48 | */
49 | - (void)setUpContentViewFrame:(void(^)(UIView *contentView))contentBlock;
50 |
51 | /**
52 | 刷新标题和整个界面,在调用之前,必须先确定所有的子控制器。
53 | */
54 | - (void)refreshDisplay;
55 |
56 |
57 | /***********************************【顶部标题样式】********************************/
58 | - (void)setUpTitleEffect:(void(^)(UIColor **titleScrollViewColor,UIColor **norColor,UIColor **selColor,UIFont **titleFont,CGFloat *titleHeight,CGFloat *titleWidth))titleEffectBlock;
59 |
60 |
61 | /***********************************【下标样式】***********************************/
62 | - (void)setUpUnderLineEffect:(void(^)(BOOL *isUnderLineDelayScroll,CGFloat *underLineH,UIColor **underLineColor, BOOL *isUnderLineEqualTitleWidth))underLineBlock;
63 |
64 |
65 | /**********************************【字体缩放】************************************/
66 | - (void)setUpTitleScale:(void(^)(CGFloat *titleScale))titleScaleBlock;
67 |
68 |
69 | /**********************************【颜色渐变】************************************/
70 | - (void)setUpTitleGradient:(void(^)(YZTitleColorGradientStyle *titleColorGradientStyle,UIColor **norColor,UIColor **selColor))titleGradientBlock;
71 |
72 | /**********************************【遮盖】************************************/
73 | - (void)setUpCoverEffect:(void(^)(UIColor **coverColor,CGFloat *coverCornerRadius))coverEffectBlock;
74 |
75 | @end
76 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/YZDisplayViewController/YZDisplayViewHeader.h:
--------------------------------------------------------------------------------
1 |
2 | //
3 | // Const.h
4 | // BuDeJie
5 | //
6 | // Created by yz on 15/12/5.
7 | // Copyright © 2015年 yz. All rights reserved.
8 | //
9 |
10 | #ifndef Const_h
11 | #define Const_h
12 |
13 | /*
14 | **************用法*****************
15 |
16 | 一、导入YZDisplayViewHeader.h
17 | 二、自定义YZDisplayViewController
18 | 三、添加所有子控制器,保存标题在子控制器中
19 | 四、查看YZDisplayViewController头文件,找需要的效果设置
20 | 五、标题被点击或者内容滚动完成,会发出这个通知【"YZDisplayViewClickOrScrollDidFinsh"】,监听这个通知,可以做自己想要做的事情,比如加载数据
21 | */
22 |
23 |
24 | /*
25 | **************使用须知*****************
26 | 1.字体放大效果和角标不能同时使用。
27 | 2.当前框架,如果标题宽度自定义,就不能使用颜色填充模式(YZTitleColorGradientStyleFill),因为要做今日头条效果,标题宽度比较内部计算好。
28 | 3.当前框架已经做了离屏渲染优化和控制器view懒加载
29 | 2.网易效果:颜色渐变 + 字体缩放
30 | 3.进入头条效果:颜色填充渐变
31 | 4.展示tableView的时候,如果有UITabBarController,UINavgationController,需要自己给tableView顶部添加64额外滚动额外滚动区域。
32 | */
33 |
34 | #import "YZDisplayViewController.h"
35 |
36 | // 导航条高度
37 | static CGFloat const YZNavBarH = 64;
38 |
39 | // 标题滚动视图的高度
40 | static CGFloat const YZTitleScrollViewH = 44;
41 |
42 | // 标题缩放比例
43 | static CGFloat const YZTitleTransformScale = 1.3;
44 |
45 | // 下划线默认高度
46 | static CGFloat const YZUnderLineH = 2;
47 |
48 | #define YZScreenW [UIScreen mainScreen].bounds.size.width
49 | #define YZScreenH [UIScreen mainScreen].bounds.size.height
50 |
51 | // 默认标题字体
52 | #define YZTitleFont [UIFont systemFontOfSize:15]
53 |
54 | // 默认标题间距
55 | static CGFloat const margin = 20;
56 |
57 | // 标题被点击或者内容滚动完成,会发出这个通知,监听这个通知,可以做自己想要做的事情,比如加载数据
58 | static NSString * const YZDisplayViewClickOrScrollDidFinshNote = @"YZDisplayViewClickOrScrollDidFinshNote";
59 |
60 | // 重复点击通知
61 | static NSString * const YZDisplayViewRepeatClickTitleNote = @"YZDisplayViewRepeatClickTitleNote";
62 |
63 |
64 | #endif /* Const_h */
65 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/YZDisplayViewController/YZFlowLayout.h:
--------------------------------------------------------------------------------
1 | //
2 | // YZFlowLayout.h
3 | // YZDisplayViewControllerDemo
4 | //
5 | // Created by yz on 15/12/20.
6 | // Copyright © 2015年 yz. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface YZFlowLayout : UICollectionViewFlowLayout
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ELENews/ELENews/Vender/YZDisplayViewController/YZFlowLayout.m:
--------------------------------------------------------------------------------
1 | //
2 | // YZFlowLayout.m
3 | // YZDisplayViewControllerDemo
4 | //
5 | // Created by yz on 15/12/20.
6 | // Copyright © 2015年 yz. All rights reserved.
7 | //
8 |
9 | #import "YZFlowLayout.h"
10 |
11 | @implementation YZFlowLayout
12 |
13 | - (void)prepareLayout
14 | {
15 | [super prepareLayout];
16 |
17 | self.minimumInteritemSpacing = 0;
18 |
19 | self.minimumLineSpacing = 0;
20 |
21 | if (self.collectionView.bounds.size.height) {
22 |
23 | self.itemSize = self.collectionView.bounds.size;
24 | }
25 |
26 | self.scrollDirection = UICollectionViewScrollDirectionHorizontal;
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/ELENews/ELENews/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ELENews
4 | //
5 | // Created by EL on 2017/11/10.
6 | // Copyright © 2017年 ElegantLiar. 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 |
--------------------------------------------------------------------------------
/ELENews/ELENewsTests/ELENewsTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELENewsTests.m
3 | // ELENewsTests
4 | //
5 | // Created by EL on 2017/11/10.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELENewsTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation ELENewsTests
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 |
--------------------------------------------------------------------------------
/ELENews/ELENewsTests/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 |
--------------------------------------------------------------------------------
/ELENews/ELENewsUITests/ELENewsUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ELENewsUITests.m
3 | // ELENewsUITests
4 | //
5 | // Created by EL on 2017/11/10.
6 | // Copyright © 2017年 ElegantLiar. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ELENewsUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation ELENewsUITests
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 |
--------------------------------------------------------------------------------
/ELENews/ELENewsUITests/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 |
--------------------------------------------------------------------------------
/ELENews/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, ‘9.0’
2 |
3 | target :’ELENews’ do
4 | pod 'MJRefresh'
5 | pod 'YYModel', '~> 1.0.4'
6 | pod 'Texture/PINRemoteImage', '~> 2.5.1'
7 | pod 'FDFullscreenPopGesture','1.1'
8 | pod 'Masonry', '~> 1.1.0'
9 | pod 'ReactiveCocoa','2.5'
10 | pod 'AFNetworking', '~> 3.1.0'
11 | pod 'PINRemoteImage/WebP'
12 | pod 'YYWebImage', '~> 1.0.5'
13 | pod 'lottie-ios', '~> 2.1.4'
14 | pod 'XHLaunchAd'
15 | end
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | ## 高仿橘子娱乐项目 (不断完善更新中)
3 | ### [简书地址](https://www.jianshu.com/p/20ce1dfa84c5)
4 |
5 | ## 简介
6 |
7 | #### 使用OC语言高仿橘子娱乐APP,主要使用AsyncDisplayKit提升整个APP项目流畅性,保证主要界面FPS>60以上,由于练习使用ReactiveCocoa,后续会对项目内用的绑定相关进行修改。
8 |
9 | ## 目前完成的功能
10 | - 视频广告启动页面
11 | - 首页、视频、社区的布局
12 | - 首页、视频feed流(资讯、快讯、GIF等)
13 | - 资讯详情页(包括资讯内容、用户评论)
14 | - 视频详情页(视频播放、资讯内容、用户评论)
15 | - 社区tab内推荐、最新、发现的feed流
16 | - feed流的下拉刷新
17 |
18 | ## 使用的三方库
19 | - Texture(AsyncDisplayKit)主要流界面的布局
20 | - MJRefresh下拉刷新实现
21 | - XHLaunchAd视频、图片开屏的实现
22 | - lottie-ios 一些json动画的实现
23 | - Masonry 非node布局的实现
24 | - AFNetworking 网络请求
25 | - YYModel 模型解析
26 | - YYWebImage 非node网络图片加载
27 | - ReactiveCocoa 链式响应 (练习使用)
28 |
29 | ## 主要界面的GIF图
30 | ### 开屏
31 | 
32 | ### feed流
33 | 
34 | 
35 | ### 详情页
36 | 
37 | 
38 | ### 社区
39 | 
40 |
41 | ## 写在最后
42 | 该项目是在工作之余,用来练习使用一些新的三方库和架构模式练习写的。笔者在工作闲暇会坚持更新项目和博客,项目开始于2017.12月初,因为写的时间不是很长可能会存在一些bug和问题,我会对于这些问题及时修复。如果该项目对您有帮助,请在git上star一下,有问题也可以issue我,欢迎大家交流。
--------------------------------------------------------------------------------