├── JRTT.gif ├── JRTTDemo.xcodeproj └── project.pbxproj ├── JRTTDemo ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── AppIcon-News29x29@2x.png │ │ ├── AppIcon-News29x29@3x.png │ │ ├── AppIcon-News40x40@2x-1.png │ │ ├── AppIcon-News40x40@2x.png │ │ ├── AppIcon-News40x40@3x-1.png │ │ ├── AppIcon-News40x40@3x.png │ │ ├── Contents.json │ │ ├── Icon.png │ │ └── Icon@2x.png │ ├── Cell │ │ ├── Contents.json │ │ ├── add_textpage.imageset │ │ │ ├── Contents.json │ │ │ ├── add_textpage~ipad.png │ │ │ ├── add_textpage~ipad@2x.png │ │ │ ├── add_textpage~iphone.png │ │ │ └── add_textpage~iphone@2x.png │ │ ├── add_textpage_night.imageset │ │ │ ├── Contents.json │ │ │ ├── add_textpage_night~ipad.png │ │ │ ├── add_textpage_night~ipad@2x.png │ │ │ ├── add_textpage_night~iphone.png │ │ │ └── add_textpage_night~iphone@2x.png │ │ ├── chatroom_icon_video1.imageset │ │ │ ├── Contents.json │ │ │ ├── chatroom_icon_video1~iphone.png │ │ │ └── chatroom_icon_video1~iphone@2x.png │ │ ├── chatroom_icon_video1_night.imageset │ │ │ ├── Contents.json │ │ │ ├── chatroom_icon_video1_night~iphone.png │ │ │ └── chatroom_icon_video1_night~iphone@2x.png │ │ ├── guide_amount_close.imageset │ │ │ ├── Contents.json │ │ │ ├── guide_amount_close~iphone.png │ │ │ └── guide_amount_close~iphone@2x.png │ │ ├── guide_amount_close_big.imageset │ │ │ ├── Contents.json │ │ │ ├── guide_amount_close_big~iphone.png │ │ │ └── guide_amount_close_big~iphone@2x.png │ │ ├── guide_amount_close_big_night.imageset │ │ │ ├── Contents.json │ │ │ ├── guide_amount_close_big_night~iphone.png │ │ │ └── guide_amount_close_big_night~iphone@2x.png │ │ └── guide_amount_close_night.imageset │ │ │ ├── Contents.json │ │ │ ├── guide_amount_close_night~iphone.png │ │ │ └── guide_amount_close_night~iphone@2x.png │ ├── Contents.json │ ├── LaunchImage-700-568h.imageset │ │ ├── Contents.json │ │ └── LaunchImage-700-568h@2x.png │ └── tabbar │ │ ├── Contents.json │ │ ├── home.imageset │ │ ├── Contents.json │ │ ├── home~ipad.png │ │ └── home~ipad@2x.png │ │ ├── home_press.imageset │ │ ├── Contents.json │ │ ├── home_press~ipad.png │ │ └── home_press~ipad@2x.png │ │ ├── home_tabbar.imageset │ │ ├── Contents.json │ │ ├── home_tabbar~iphone.png │ │ └── home_tabbar~iphone@2x.png │ │ ├── home_tabbar_night.imageset │ │ ├── Contents.json │ │ ├── home_tabbar_night~iphone.png │ │ └── home_tabbar_night~iphone@2x.png │ │ ├── home_tabbar_press.imageset │ │ ├── Contents.json │ │ ├── home_tabbar_press~iphone.png │ │ └── home_tabbar_press~iphone@2x.png │ │ ├── home_tabbar_press_night.imageset │ │ ├── Contents.json │ │ ├── home_tabbar_press_night~iphone.png │ │ └── home_tabbar_press_night~iphone@2x.png │ │ ├── tab_huoshan_logo.imageset │ │ ├── Contents.json │ │ ├── tab_huoshan_logo~iphone.png │ │ └── tab_huoshan_logo~iphone@2x.png │ │ ├── tab_huoshan_logo_night.imageset │ │ ├── Contents.json │ │ ├── tab_huoshan_logo_night~iphone.png │ │ └── tab_huoshan_logo_night~iphone@2x.png │ │ ├── video_tabbar.imageset │ │ ├── Contents.json │ │ ├── video_tabbar~iphone.png │ │ └── video_tabbar~iphone@2x.png │ │ ├── video_tabbar_night.imageset │ │ ├── Contents.json │ │ ├── video_tabbar_night~iphone.png │ │ └── video_tabbar_night~iphone@2x.png │ │ ├── video_tabbar_press.imageset │ │ ├── Contents.json │ │ ├── video_tabbar_press~iphone.png │ │ └── video_tabbar_press~iphone@2x.png │ │ ├── video_tabbar_press_night.imageset │ │ ├── Contents.json │ │ ├── video_tabbar_press_night~iphone.png │ │ └── video_tabbar_press_night~iphone@2x.png │ │ ├── weitoutiao_tabbar.imageset │ │ ├── Contents.json │ │ ├── weitoutiao_tabbar~iphone.png │ │ └── weitoutiao_tabbar~iphone@2x.png │ │ ├── weitoutiao_tabbar_night.imageset │ │ ├── Contents.json │ │ ├── weitoutiao_tabbar_night~iphone.png │ │ └── weitoutiao_tabbar_night~iphone@2x.png │ │ ├── weitoutiao_tabbar_press.imageset │ │ ├── Contents.json │ │ ├── weitoutiao_tabbar_press~iphone.png │ │ └── weitoutiao_tabbar_press~iphone@2x.png │ │ └── weitoutiao_tabbar_press_night.imageset │ │ ├── Contents.json │ │ ├── weitoutiao_tabbar_press_night~iphone.png │ │ └── weitoutiao_tabbar_press_night~iphone@2x.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Class │ ├── Base │ │ └── ViewModel │ │ │ ├── BaseCollectionViewModel.h │ │ │ ├── BaseCollectionViewModel.m │ │ │ └── ReactiveView.h │ ├── DetailVC │ │ ├── DetailZBViewController.h │ │ └── DetailZBViewController.m │ ├── Home │ │ ├── ChilderVC │ │ │ ├── View │ │ │ │ ├── CollectionCell │ │ │ │ │ ├── SmalVideoCollectionViewCell.h │ │ │ │ │ ├── SmalVideoCollectionViewCell.m │ │ │ │ │ └── SmalVideoCollectionViewCell.xib │ │ │ │ └── tableCell │ │ │ │ │ ├── ImgBottomOneTableViewCell.h │ │ │ │ │ ├── ImgBottomOneTableViewCell.m │ │ │ │ │ ├── ImgBottomOneTableViewCell.xib │ │ │ │ │ ├── ImgBottomTableViewCell.h │ │ │ │ │ ├── ImgBottomTableViewCell.m │ │ │ │ │ ├── ImgBottomTableViewCell.xib │ │ │ │ │ ├── ImgLeftTableViewCell.h │ │ │ │ │ ├── ImgLeftTableViewCell.m │ │ │ │ │ ├── ImgLeftTableViewCell.xib │ │ │ │ │ ├── TWTableViewCell.h │ │ │ │ │ ├── TWTableViewCell.m │ │ │ │ │ ├── ZhiBoTableViewCell.h │ │ │ │ │ ├── ZhiBoTableViewCell.m │ │ │ │ │ └── ZhiBoTableViewCell.xib │ │ │ ├── ViewModel │ │ │ │ ├── SmallVideoViewModel.h │ │ │ │ └── SmallVideoViewModel.m │ │ │ ├── model │ │ │ │ ├── ContentModel.h │ │ │ │ ├── ContentModel.m │ │ │ │ ├── DataModel.h │ │ │ │ └── DataModel.m │ │ │ └── vc │ │ │ │ ├── BaseChirldViewController.h │ │ │ │ ├── BaseChirldViewController.m │ │ │ │ ├── CDViewController.h │ │ │ │ ├── CDViewController.m │ │ │ │ ├── SmallVideoViewController.h │ │ │ │ └── SmallVideoViewController.m │ │ ├── HomeViewController.h │ │ ├── HomeViewController.m │ │ ├── Model │ │ │ ├── TitleModel.h │ │ │ └── TitleModel.m │ │ └── view │ │ │ ├── Cell │ │ │ ├── HomeMenuCollectionViewCell.h │ │ │ ├── HomeMenuCollectionViewCell.m │ │ │ └── HomeMenuCollectionViewCell.xib │ │ │ ├── HomeMenuView.h │ │ │ ├── HomeMenuView.m │ │ │ ├── HomeMenuView.xib │ │ │ ├── View │ │ │ ├── PlaybackView.h │ │ │ ├── PlaybackView.m │ │ │ ├── PlaybackView.xib │ │ │ ├── ViewModel │ │ │ │ ├── PlayBackViewModel.h │ │ │ │ └── PlayBackViewModel.m │ │ │ └── cell │ │ │ │ ├── PlayBackCollectionViewCell.h │ │ │ │ ├── PlayBackCollectionViewCell.m │ │ │ │ └── PlayBackCollectionViewCell.xib │ │ │ └── ViewModel │ │ │ ├── CollectionViewModel.h │ │ │ └── CollectionViewModel.m │ └── TouTiao │ │ ├── TopView │ │ ├── AAACollectionViewCell.h │ │ ├── AAACollectionViewCell.m │ │ ├── AAACollectionViewCell.xib │ │ ├── SSHomeTopView.h │ │ └── SSHomeTopView.m │ │ ├── WeiTouTiaoViewController.h │ │ └── WeiTouTiaoViewController.m ├── Info.plist ├── Marc │ └── MarcHeader.h ├── NetWork │ ├── HttpHelper.h │ └── HttpHelper.m ├── PrefixHeader.pch ├── Tool │ ├── JRTTabBarItem.h │ ├── JRTTabBarItem.m │ ├── NSString+Date.h │ ├── NSString+Date.m │ ├── UIViewController+addA.h │ └── UIViewController+addA.m └── main.m ├── JRTTDemoTests ├── Info.plist └── JRTTDemoTests.m ├── JRTTDemoUITests ├── Info.plist └── JRTTDemoUITests.m ├── Podfile └── README.md /JRTT.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTT.gif -------------------------------------------------------------------------------- /JRTTDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /JRTTDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | [PPNetworkHelper openLog]; 21 | return YES; 22 | } 23 | 24 | 25 | - (void)applicationWillResignActive:(UIApplication *)application { 26 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 27 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 28 | } 29 | 30 | 31 | - (void)applicationDidEnterBackground:(UIApplication *)application { 32 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 33 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 34 | } 35 | 36 | 37 | - (void)applicationWillEnterForeground:(UIApplication *)application { 38 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 39 | } 40 | 41 | 42 | - (void)applicationDidBecomeActive:(UIApplication *)application { 43 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 44 | } 45 | 46 | 47 | - (void)applicationWillTerminate:(UIApplication *)application { 48 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 49 | } 50 | 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News29x29@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News29x29@3x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News40x40@2x-1.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News40x40@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News40x40@3x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News40x40@3x-1.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/AppIcon.appiconset/AppIcon-News40x40@3x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon@2x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "AppIcon-News29x29@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "AppIcon-News29x29@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "AppIcon-News40x40@2x-1.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "AppIcon-News40x40@3x-1.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "AppIcon-News40x40@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "AppIcon-News40x40@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "idiom" : "ios-marketing", 53 | "size" : "1024x1024", 54 | "scale" : "1x" 55 | } 56 | ], 57 | "info" : { 58 | "version" : 1, 59 | "author" : "xcode" 60 | } 61 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/AppIcon.appiconset/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/AppIcon.appiconset/Icon.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/AppIcon.appiconset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/AppIcon.appiconset/Icon@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/add_textpage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "add_textpage~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "add_textpage~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | }, 17 | { 18 | "idiom" : "ipad", 19 | "filename" : "add_textpage~ipad.png", 20 | "scale" : "1x" 21 | }, 22 | { 23 | "idiom" : "ipad", 24 | "filename" : "add_textpage~ipad@2x.png", 25 | "scale" : "2x" 26 | } 27 | ], 28 | "info" : { 29 | "version" : 1, 30 | "author" : "xcode" 31 | } 32 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/add_textpage.imageset/add_textpage~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/add_textpage.imageset/add_textpage~ipad.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/add_textpage.imageset/add_textpage~ipad@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/add_textpage.imageset/add_textpage~ipad@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/add_textpage.imageset/add_textpage~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/add_textpage.imageset/add_textpage~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/add_textpage.imageset/add_textpage~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/add_textpage.imageset/add_textpage~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/add_textpage_night.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "add_textpage_night~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "add_textpage_night~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | }, 17 | { 18 | "idiom" : "ipad", 19 | "filename" : "add_textpage_night~ipad.png", 20 | "scale" : "1x" 21 | }, 22 | { 23 | "idiom" : "ipad", 24 | "filename" : "add_textpage_night~ipad@2x.png", 25 | "scale" : "2x" 26 | } 27 | ], 28 | "info" : { 29 | "version" : 1, 30 | "author" : "xcode" 31 | } 32 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/add_textpage_night.imageset/add_textpage_night~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/add_textpage_night.imageset/add_textpage_night~ipad.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/add_textpage_night.imageset/add_textpage_night~ipad@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/add_textpage_night.imageset/add_textpage_night~ipad@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/add_textpage_night.imageset/add_textpage_night~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/add_textpage_night.imageset/add_textpage_night~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/add_textpage_night.imageset/add_textpage_night~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/add_textpage_night.imageset/add_textpage_night~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/chatroom_icon_video1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "chatroom_icon_video1~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "chatroom_icon_video1~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/chatroom_icon_video1.imageset/chatroom_icon_video1~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/chatroom_icon_video1.imageset/chatroom_icon_video1~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/chatroom_icon_video1.imageset/chatroom_icon_video1~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/chatroom_icon_video1.imageset/chatroom_icon_video1~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/chatroom_icon_video1_night.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "chatroom_icon_video1_night~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "chatroom_icon_video1_night~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/chatroom_icon_video1_night.imageset/chatroom_icon_video1_night~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/chatroom_icon_video1_night.imageset/chatroom_icon_video1_night~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/chatroom_icon_video1_night.imageset/chatroom_icon_video1_night~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/chatroom_icon_video1_night.imageset/chatroom_icon_video1_night~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "guide_amount_close~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "guide_amount_close~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close.imageset/guide_amount_close~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/guide_amount_close.imageset/guide_amount_close~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close.imageset/guide_amount_close~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/guide_amount_close.imageset/guide_amount_close~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close_big.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "guide_amount_close_big~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "guide_amount_close_big~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close_big.imageset/guide_amount_close_big~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/guide_amount_close_big.imageset/guide_amount_close_big~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close_big.imageset/guide_amount_close_big~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/guide_amount_close_big.imageset/guide_amount_close_big~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close_big_night.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "guide_amount_close_big_night~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "guide_amount_close_big_night~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close_big_night.imageset/guide_amount_close_big_night~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/guide_amount_close_big_night.imageset/guide_amount_close_big_night~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close_big_night.imageset/guide_amount_close_big_night~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/guide_amount_close_big_night.imageset/guide_amount_close_big_night~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close_night.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "guide_amount_close_night~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "guide_amount_close_night~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close_night.imageset/guide_amount_close_night~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/guide_amount_close_night.imageset/guide_amount_close_night~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Cell/guide_amount_close_night.imageset/guide_amount_close_night~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/Cell/guide_amount_close_night.imageset/guide_amount_close_night~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/LaunchImage-700-568h.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "LaunchImage-700-568h@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/LaunchImage-700-568h.imageset/LaunchImage-700-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/LaunchImage-700-568h.imageset/LaunchImage-700-568h@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "ipad", 5 | "filename" : "home~ipad.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "ipad", 10 | "filename" : "home~ipad@2x.png", 11 | "scale" : "2x" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home.imageset/home~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home.imageset/home~ipad.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home.imageset/home~ipad@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home.imageset/home~ipad@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_press.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "ipad", 5 | "filename" : "home_press~ipad.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "ipad", 10 | "filename" : "home_press~ipad@2x.png", 11 | "scale" : "2x" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_press.imageset/home_press~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home_press.imageset/home_press~ipad.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_press.imageset/home_press~ipad@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home_press.imageset/home_press~ipad@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "home_tabbar~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "home_tabbar~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar.imageset/home_tabbar~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home_tabbar.imageset/home_tabbar~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar.imageset/home_tabbar~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home_tabbar.imageset/home_tabbar~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar_night.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "home_tabbar_night~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "home_tabbar_night~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar_night.imageset/home_tabbar_night~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home_tabbar_night.imageset/home_tabbar_night~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar_night.imageset/home_tabbar_night~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home_tabbar_night.imageset/home_tabbar_night~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar_press.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "home_tabbar_press~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "home_tabbar_press~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar_press.imageset/home_tabbar_press~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home_tabbar_press.imageset/home_tabbar_press~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar_press.imageset/home_tabbar_press~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home_tabbar_press.imageset/home_tabbar_press~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar_press_night.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "home_tabbar_press_night~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "home_tabbar_press_night~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar_press_night.imageset/home_tabbar_press_night~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home_tabbar_press_night.imageset/home_tabbar_press_night~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/home_tabbar_press_night.imageset/home_tabbar_press_night~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/home_tabbar_press_night.imageset/home_tabbar_press_night~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/tab_huoshan_logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "tab_huoshan_logo~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "tab_huoshan_logo~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/tab_huoshan_logo.imageset/tab_huoshan_logo~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/tab_huoshan_logo.imageset/tab_huoshan_logo~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/tab_huoshan_logo.imageset/tab_huoshan_logo~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/tab_huoshan_logo.imageset/tab_huoshan_logo~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/tab_huoshan_logo_night.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "tab_huoshan_logo_night~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "tab_huoshan_logo_night~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/tab_huoshan_logo_night.imageset/tab_huoshan_logo_night~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/tab_huoshan_logo_night.imageset/tab_huoshan_logo_night~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/tab_huoshan_logo_night.imageset/tab_huoshan_logo_night~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/tab_huoshan_logo_night.imageset/tab_huoshan_logo_night~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "video_tabbar~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "video_tabbar~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar.imageset/video_tabbar~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/video_tabbar.imageset/video_tabbar~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar.imageset/video_tabbar~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/video_tabbar.imageset/video_tabbar~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar_night.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "video_tabbar_night~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "video_tabbar_night~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar_night.imageset/video_tabbar_night~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/video_tabbar_night.imageset/video_tabbar_night~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar_night.imageset/video_tabbar_night~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/video_tabbar_night.imageset/video_tabbar_night~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar_press.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "video_tabbar_press~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "video_tabbar_press~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar_press.imageset/video_tabbar_press~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/video_tabbar_press.imageset/video_tabbar_press~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar_press.imageset/video_tabbar_press~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/video_tabbar_press.imageset/video_tabbar_press~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar_press_night.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "video_tabbar_press_night~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "video_tabbar_press_night~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar_press_night.imageset/video_tabbar_press_night~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/video_tabbar_press_night.imageset/video_tabbar_press_night~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/video_tabbar_press_night.imageset/video_tabbar_press_night~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/video_tabbar_press_night.imageset/video_tabbar_press_night~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "weitoutiao_tabbar~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "weitoutiao_tabbar~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar.imageset/weitoutiao_tabbar~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar.imageset/weitoutiao_tabbar~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar.imageset/weitoutiao_tabbar~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar.imageset/weitoutiao_tabbar~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_night.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "weitoutiao_tabbar_night~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "weitoutiao_tabbar_night~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_night.imageset/weitoutiao_tabbar_night~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_night.imageset/weitoutiao_tabbar_night~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_night.imageset/weitoutiao_tabbar_night~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_night.imageset/weitoutiao_tabbar_night~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_press.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "weitoutiao_tabbar_press~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "weitoutiao_tabbar_press~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_press.imageset/weitoutiao_tabbar_press~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_press.imageset/weitoutiao_tabbar_press~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_press.imageset/weitoutiao_tabbar_press~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_press.imageset/weitoutiao_tabbar_press~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_press_night.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "filename" : "weitoutiao_tabbar_press_night~iphone.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "filename" : "weitoutiao_tabbar_press_night~iphone@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_press_night.imageset/weitoutiao_tabbar_press_night~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_press_night.imageset/weitoutiao_tabbar_press_night~iphone.png -------------------------------------------------------------------------------- /JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_press_night.imageset/weitoutiao_tabbar_press_night~iphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QiuYeHong90/JRTTDemo/4e4629fc1b54ab86c5289a7072feb8ca0b7402c5/JRTTDemo/Assets.xcassets/tabbar/weitoutiao_tabbar_press_night.imageset/weitoutiao_tabbar_press_night~iphone@2x.png -------------------------------------------------------------------------------- /JRTTDemo/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 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Base/ViewModel/BaseCollectionViewModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // BaseCollectionViewModel.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | #import "ReactiveView.h" 9 | #import 10 | typedef void(^didSelectedBlock)(NSIndexPath *idxPath,NSMutableArray *dataArray); 11 | @interface BaseCollectionViewModel : NSObject 12 | 13 | 14 | @property (nonatomic,strong) UICollectionView * collectionView; 15 | @property (nonatomic,copy) NSString * cellIdentifer; 16 | @property (nonatomic,strong) NSMutableArray * dataArray; 17 | @property (nonatomic,copy) didSelectedBlock callBlock; 18 | 19 | -(void)setCollectionView:(UICollectionView *)collectionView 20 | datayArray:(NSMutableArray *)datayArray 21 | cellIdentifer:(NSString *)cellIdentifer 22 | didSelectedBlock:(didSelectedBlock)didSelectedBlock; 23 | 24 | -(void)registerCell; 25 | 26 | -(void)updateData:(NSMutableArray *)dataArray; 27 | @end 28 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Base/ViewModel/BaseCollectionViewModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // BaseCollectionViewModel.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "BaseCollectionViewModel.h" 10 | 11 | @interface BaseCollectionViewModel() 12 | 13 | @end 14 | 15 | @implementation BaseCollectionViewModel 16 | -(NSMutableArray *)dataArray 17 | { 18 | if (!_dataArray) { 19 | _dataArray = @[].mutableCopy; 20 | } 21 | return _dataArray; 22 | } 23 | -(void)setCollectionView:(UICollectionView *)collectionView 24 | datayArray:(NSMutableArray *)datayArray 25 | cellIdentifer:(NSString *)cellIdentifer 26 | didSelectedBlock:(didSelectedBlock)didSelectedBlock 27 | { 28 | 29 | 30 | self.cellIdentifer = cellIdentifer; 31 | self.collectionView = collectionView; 32 | collectionView.delegate = self; 33 | collectionView.dataSource = self; 34 | 35 | [self registerCell]; 36 | 37 | self.dataArray = datayArray; 38 | self.callBlock = didSelectedBlock; 39 | 40 | 41 | } 42 | -(void)registerCell 43 | { 44 | [self.collectionView registerNib:[UINib nibWithNibName:self.cellIdentifer bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:self.cellIdentifer]; 45 | } 46 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section; 47 | { 48 | 49 | NSInteger count = self.dataArray.count; 50 | return count; 51 | } 52 | - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath 53 | 54 | { 55 | UICollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:self.cellIdentifer forIndexPath:indexPath]; 56 | [cell bindData:self.dataArray indexPath:indexPath]; 57 | 58 | return cell; 59 | } 60 | 61 | -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath 62 | { 63 | if (self.callBlock) { 64 | self.callBlock(indexPath, self.dataArray); 65 | } 66 | } 67 | -(void)updateData:(NSMutableArray *)dataArray 68 | { 69 | self.dataArray = dataArray; 70 | [self.collectionView reloadData]; 71 | } 72 | @end 73 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Base/ViewModel/ReactiveView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ReactiveView.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol ReactiveView 12 | -(void)bindData:(id)data indexPath:(NSIndexPath *)indexPath; 13 | 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /JRTTDemo/Class/DetailVC/DetailZBViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DetailZBViewController.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/9. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DetailZBViewController : UIViewController 12 | @property (weak, nonatomic) IBOutlet ZFPlayerView *playerView; 13 | 14 | @property (nonatomic,copy) NSString * live_id; 15 | @end 16 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/CollectionCell/SmalVideoCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // SmalVideoCollectionViewCell.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SmalVideoCollectionViewCell : UICollectionViewCell 12 | @property (weak, nonatomic) IBOutlet UIImageView *bgImageView; 13 | @property (weak, nonatomic) IBOutlet UIImageView *headerImageView; 14 | @property (weak, nonatomic) IBOutlet UILabel *contentLab; 15 | @property (weak, nonatomic) IBOutlet UILabel *nameLab; 16 | @property (weak, nonatomic) IBOutlet UILabel *zanLab; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/CollectionCell/SmalVideoCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // SmalVideoCollectionViewCell.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | 10 | #import "DataModel.h" 11 | #import "SmalVideoCollectionViewCell.h" 12 | 13 | @implementation SmalVideoCollectionViewCell 14 | 15 | - (void)awakeFromNib { 16 | [super awakeFromNib]; 17 | // Initialization code 18 | } 19 | -(void)bindData:(id)data indexPath:(NSIndexPath *)indexPath 20 | { 21 | Data * dict = data[indexPath.row]; 22 | 23 | NSString * title = dict.model[@"raw_data"][@"title"]; 24 | 25 | NSInteger digg_count = [dict.model[@"raw_data"][@"action"][@"digg_count"] integerValue]; 26 | 27 | 28 | 29 | NSDictionary * user = dict.model[@"raw_data"][@"user"]; 30 | NSString * avatar_url = user[@"info"][@"avatar_url"]; 31 | NSString * name = user[@"info"][@"name"]; 32 | 33 | 34 | NSArray * large_image_list = dict.model[@"raw_data"][@"large_image_list"]; 35 | NSString * url = @""; 36 | if (large_image_list) { 37 | url = large_image_list[0][@"url"]; 38 | url = [self imgUrl:url]; 39 | } 40 | 41 | [self.bgImageView sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:nil]; 42 | [self.headerImageView sd_setImageWithURL:[NSURL URLWithString:avatar_url] placeholderImage:nil]; 43 | 44 | self.contentLab.text = title; 45 | self.nameLab.text = name; 46 | self.zanLab.text = [NSString stringWithFormat:@"%ld赞",digg_count]; 47 | 48 | } 49 | 50 | -(NSString *)imgUrl:(NSString *)url 51 | { 52 | if ([url hasSuffix:@".webp"]) { 53 | url = [url stringByReplacingOccurrencesOfString:@".webp" withString:@".png"]; 54 | } 55 | 56 | return url; 57 | } 58 | @end 59 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/CollectionCell/SmalVideoCollectionViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 37 | 43 | 49 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ImgBottomOneTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ImgBottomOneTableViewCell.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "TWTableViewCell.h" 10 | #import 11 | 12 | @interface ImgBottomOneTableViewCell : TWTableViewCell 13 | @property (weak, nonatomic) IBOutlet UIImageView *imageView0; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ImgBottomOneTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ImgBottomOneTableViewCell.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "ImgBottomOneTableViewCell.h" 10 | 11 | @implementation ImgBottomOneTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | [super awakeFromNib]; 15 | // Initialization code 16 | } 17 | -(void)setArr:(NSArray *)arr indexPath:(NSIndexPath *)indexPath 18 | { 19 | [super setArr:arr indexPath:indexPath]; 20 | Data * dict = arr[indexPath.row]; 21 | NSString * url0 = dict.model[@"image_list"][0][@"url"]; 22 | url0 = [self imgUrl:url0]; 23 | [self.imageView0 sd_setImageWithURL:[NSURL URLWithString:url0] placeholderImage:nil]; 24 | 25 | } 26 | 27 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 28 | [super setSelected:selected animated:animated]; 29 | 30 | // Configure the view for the selected state 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ImgBottomOneTableViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 34 | 40 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ImgBottomTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ImgBottomTableViewCell.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "TWTableViewCell.h" 10 | #import 11 | 12 | @interface ImgBottomTableViewCell : TWTableViewCell 13 | @property (weak, nonatomic) IBOutlet UIImageView *imgView0; 14 | @property (weak, nonatomic) IBOutlet UIImageView *imgView1; 15 | @property (weak, nonatomic) IBOutlet UIImageView *imgView2; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ImgBottomTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ImgBottomTableViewCell.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "ImgBottomTableViewCell.h" 10 | 11 | @implementation ImgBottomTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | [super awakeFromNib]; 15 | // Initialization code 16 | } 17 | -(void)setArr:(NSArray *)arr indexPath:(NSIndexPath *)indexPath 18 | 19 | { 20 | [super setArr:arr indexPath:indexPath]; 21 | Data * dict = arr[indexPath.row]; 22 | 23 | NSString * url0 = dict.model[@"image_list"][0][@"url"]; 24 | NSString * url1 = dict.model[@"image_list"][1][@"url"]; 25 | NSString * url2 = dict.model[@"image_list"][2][@"url"]; 26 | 27 | url0 = [self imgUrl:url0]; 28 | url1 = [self imgUrl:url1]; 29 | url2 = [self imgUrl:url2]; 30 | 31 | [self.imgView0 sd_setImageWithURL:[NSURL URLWithString:url0] placeholderImage:nil]; 32 | [self.imgView1 sd_setImageWithURL:[NSURL URLWithString:url1] placeholderImage:nil]; 33 | [self.imgView2 sd_setImageWithURL:[NSURL URLWithString:url2] placeholderImage:nil]; 34 | 35 | } 36 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 37 | [super setSelected:selected animated:animated]; 38 | 39 | // Configure the view for the selected state 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ImgBottomTableViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 34 | 40 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ImgLeftTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ImgLeftTableViewCell.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "TWTableViewCell.h" 10 | #import 11 | 12 | @interface ImgLeftTableViewCell : TWTableViewCell 13 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *leftImg_W; 14 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *leftImg_H; 15 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *Img_margin_Right; 16 | 17 | @property (weak, nonatomic) IBOutlet UIImageView *imgView; 18 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *rightX; 19 | 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ImgLeftTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ImgLeftTableViewCell.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "ImgLeftTableViewCell.h" 10 | 11 | @implementation ImgLeftTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | [super awakeFromNib]; 15 | // Initialization code 16 | } 17 | 18 | -(void)setArr:(NSArray *)arr indexPath:(NSIndexPath *)indexPath 19 | { 20 | Data * dict = arr[indexPath.row]; 21 | 22 | 23 | 24 | self.leftImg_H.constant = [dict middle_image_H]; 25 | self.leftImg_W.constant = [dict middle_image_W]; 26 | self.Img_margin_Right.constant = [dict middle_image_MarginR]; 27 | 28 | self.titleLab.text = dict.model[@"title"]; 29 | NSString * url = dict.model[@"middle_image"][@"url"]; 30 | url = [self imgUrl:url]; 31 | 32 | [self.imgView sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:nil]; 33 | 34 | if (dict.RightX124) { 35 | self.rightX.constant = 124+10+10; 36 | }else{ 37 | self.rightX.constant = 10; 38 | } 39 | 40 | 41 | } 42 | 43 | 44 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 45 | [super setSelected:selected animated:animated]; 46 | 47 | // Configure the view for the selected state 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ImgLeftTableViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 41 | 47 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/TWTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TWTableViewCell.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | #import "DataModel.h" 9 | #import 10 | 11 | @interface TWTableViewCell : UITableViewCell 12 | @property (weak, nonatomic) IBOutlet UILabel *titleLab; 13 | -(void)setArr:(NSArray *)arr indexPath:(NSIndexPath *)indexPath; 14 | 15 | -(NSString *)imgUrl:(NSString *)url; 16 | @end 17 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/TWTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TWTableViewCell.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "TWTableViewCell.h" 10 | 11 | @implementation TWTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | [super awakeFromNib]; 15 | // Initialization code 16 | } 17 | -(void)setArr:(NSArray *)arr indexPath:(NSIndexPath *)indexPath 18 | { 19 | Data * dict = arr[indexPath.row]; 20 | 21 | self.titleLab.text = dict.model[@"title"]; 22 | } 23 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 24 | [super setSelected:selected animated:animated]; 25 | 26 | // Configure the view for the selected state 27 | } 28 | 29 | -(NSString *)imgUrl:(NSString *)url 30 | { 31 | if ([url hasSuffix:@".webp"]) { 32 | url = [url stringByReplacingOccurrencesOfString:@".webp" withString:@".png"]; 33 | } 34 | 35 | return url; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ZhiBoTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZhiBoTableViewCell.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/9. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "ImgBottomOneTableViewCell.h" 10 | 11 | @interface ZhiBoTableViewCell : ImgBottomOneTableViewCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ZhiBoTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZhiBoTableViewCell.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/9. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "ZhiBoTableViewCell.h" 10 | 11 | @implementation ZhiBoTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | [super awakeFromNib]; 15 | // Initialization code 16 | } 17 | -(void)setArr:(NSArray *)arr indexPath:(NSIndexPath *)indexPath 18 | { 19 | [super setArr:arr indexPath:indexPath]; 20 | Data * dict = arr[indexPath.row]; 21 | NSString * url0 = dict.model[@"background"][@"video"][@"covers"]; 22 | url0 = [self imgUrl:url0]; 23 | [self.imageView0 sd_setImageWithURL:[NSURL URLWithString:url0] placeholderImage:nil]; 24 | 25 | } 26 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 27 | [super setSelected:selected animated:animated]; 28 | 29 | // Configure the view for the selected state 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/View/tableCell/ZhiBoTableViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 34 | 40 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/ViewModel/SmallVideoViewModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SmallVideoViewModel.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "BaseCollectionViewModel.h" 10 | 11 | @interface SmallVideoViewModel : BaseCollectionViewModel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/ViewModel/SmallVideoViewModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // SmallVideoViewModel.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "SmallVideoViewModel.h" 10 | 11 | @implementation SmallVideoViewModel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/model/ContentModel.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Copyright 2018 WHC_DataModelFactory 5 | * Auto-generated: 2018-02-05 11:40:35 6 | * 7 | * @author netyouli (whc) 8 | * @website http://wuhaichao.com 9 | * @github https://github.com/netyouli 10 | */ 11 | 12 | 13 | 14 | @interface Media_info :NSObject 15 | @property (nonatomic , assign) BOOL follow; 16 | @property (nonatomic , assign) BOOL is_star_user; 17 | @property (nonatomic , copy) NSString * recommend_reason; 18 | @property (nonatomic , assign) BOOL user_verified; 19 | @property (nonatomic , assign) NSInteger media_id; 20 | @property (nonatomic , copy) NSString * verified_content; 21 | @property (nonatomic , assign) NSInteger user_id; 22 | @property (nonatomic , assign) NSInteger recommend_type; 23 | @property (nonatomic , copy) NSString * avatar_url; 24 | @property (nonatomic , copy) NSString * name; 25 | 26 | @end 27 | 28 | @interface Log_pb :NSObject 29 | @property (nonatomic , copy) NSString * impr_id; 30 | 31 | @end 32 | 33 | @interface Extra :NSObject 34 | 35 | @end 36 | 37 | @interface Action_list :NSObject 38 | @property (nonatomic , copy) NSString * desc; 39 | @property (nonatomic , assign) NSInteger action; 40 | @property (nonatomic , strong) Extra * extra; 41 | 42 | @end 43 | 44 | @interface Forward_info :NSObject 45 | @property (nonatomic , assign) NSInteger forward_count; 46 | 47 | @end 48 | @interface Middle_image :NSObject 49 | @property (nonatomic , assign) NSInteger width; 50 | 51 | @property (nonatomic , assign) NSInteger height; 52 | @property (nonatomic , copy) NSString * uri; 53 | @property (nonatomic , copy) NSString * url; 54 | 55 | @end 56 | @interface User_info :NSObject 57 | @property (nonatomic , assign) BOOL follow; 58 | @property (nonatomic , copy) NSString * name; 59 | @property (nonatomic , copy) NSString * user_auth_info; 60 | @property (nonatomic , assign) BOOL user_verified; 61 | @property (nonatomic , copy) NSString * verified_content; 62 | @property (nonatomic , assign) NSInteger user_id; 63 | @property (nonatomic , copy) NSString * description; 64 | @property (nonatomic , copy) NSString * avatar_url; 65 | @property (nonatomic , assign) NSInteger follower_count; 66 | 67 | @end 68 | 69 | @interface Ugc_recommend :NSObject 70 | @property (nonatomic , copy) NSString * activity; 71 | @property (nonatomic , copy) NSString * reason; 72 | 73 | @end 74 | 75 | @interface ContentModel :NSObject 76 | @property (nonatomic , assign) NSInteger item_id; 77 | @property (nonatomic , assign) NSInteger cell_flag; 78 | @property (nonatomic , assign) NSInteger behot_time; 79 | @property (nonatomic , assign) NSInteger tip; 80 | @property (nonatomic , assign) NSInteger publish_time; 81 | @property (nonatomic , copy) NSString * content_decoration; 82 | @property (nonatomic , assign) NSInteger source_icon_style; 83 | @property (nonatomic , assign) NSInteger tag_id; 84 | @property (nonatomic , strong) Media_info * media_info; 85 | @property (nonatomic , assign) NSInteger preload_web; 86 | @property (nonatomic , assign) NSInteger cell_layout_style; 87 | @property (nonatomic , assign) NSInteger group_id; 88 | @property (nonatomic , assign) NSInteger cell_type; 89 | @property (nonatomic , strong) Log_pb * log_pb; 90 | @property (nonatomic , copy) NSString * media_name; 91 | @property (nonatomic , copy) NSString * title; 92 | @property (nonatomic , assign) NSInteger user_repin; 93 | @property (nonatomic , copy) NSString * display_url; 94 | @property (nonatomic , copy) NSString * url; 95 | @property (nonatomic , assign) NSInteger repin_count; 96 | @property (nonatomic , copy) NSString * stick_label; 97 | @property (nonatomic , assign) BOOL show_portrait_article; 98 | @property (nonatomic , copy) NSArray * action_list; 99 | @property (nonatomic , assign) NSInteger digg_count; 100 | @property (nonatomic , assign) BOOL has_m3u8_video; 101 | @property (nonatomic , assign) BOOL has_video; 102 | @property (nonatomic , assign) NSInteger item_version; 103 | @property (nonatomic , assign) NSInteger share_count; 104 | @property (nonatomic , copy) NSString * source; 105 | @property (nonatomic , assign) NSInteger comment_count; 106 | @property (nonatomic , assign) NSInteger cursor; 107 | @property (nonatomic , assign) NSInteger video_style; 108 | @property (nonatomic , assign) BOOL show_portrait; 109 | @property (nonatomic , assign) NSInteger stick_style; 110 | @property (nonatomic , copy) NSString * action_extra; 111 | @property (nonatomic , assign) NSInteger ignore_web_transform; 112 | @property (nonatomic , strong) Forward_info * forward_info; 113 | @property (nonatomic , assign) BOOL is_stick; 114 | @property (nonatomic , copy) NSString * verified_content; 115 | @property (nonatomic , copy) NSString * share_url; 116 | @property (nonatomic , assign) NSInteger bury_count; 117 | @property (nonatomic , assign) NSInteger article_sub_type; 118 | @property (nonatomic , assign) BOOL allow_download; 119 | @property (nonatomic , copy) NSString * tag; 120 | @property (nonatomic , strong) User_info * user_info; 121 | @property (nonatomic , assign) NSInteger level; 122 | @property (nonatomic , assign) NSInteger read_count; 123 | @property (nonatomic , assign) NSInteger article_type; 124 | @property (nonatomic , assign) NSInteger user_verified; 125 | @property (nonatomic , copy) NSString * rid; 126 | @property (nonatomic , copy) NSString * abstract; 127 | @property (nonatomic , assign) BOOL is_subject; 128 | @property (nonatomic , assign) NSInteger hot; 129 | @property (nonatomic , copy) NSString * keywords; 130 | @property (nonatomic , assign) NSInteger label_style; 131 | @property (nonatomic , assign) BOOL show_dislike; 132 | @property (nonatomic , copy) NSString * article_url; 133 | @property (nonatomic , assign) NSInteger ban_comment; 134 | @property (nonatomic , copy) NSString * source_open_url; 135 | @property (nonatomic , strong) Ugc_recommend * ugc_recommend; 136 | @property (nonatomic , copy) NSString * label; 137 | @property (nonatomic , assign) NSInteger aggr_type; 138 | @property (nonatomic , assign) NSInteger has_mp4_video; 139 | 140 | @property (nonatomic,strong) NSArray * image_list; 141 | @property (nonatomic , strong) Middle_image * middle_image; 142 | //middle_image 143 | @end 144 | 145 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/model/ContentModel.m: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Copyright 2018 WHC_DataModelFactory 5 | * Auto-generated: 2018-02-05 11:40:35 6 | * 7 | * @author netyouli (whc) 8 | * @website http://wuhaichao.com 9 | * @github https://github.com/netyouli 10 | */ 11 | 12 | #import "ContentModel.h" 13 | 14 | @implementation Media_info 15 | 16 | @end 17 | @implementation Log_pb 18 | 19 | @end 20 | @implementation Extra 21 | 22 | @end 23 | @implementation Action_list 24 | 25 | @end 26 | @implementation Forward_info 27 | 28 | @end 29 | @implementation User_info 30 | 31 | @end 32 | @implementation Ugc_recommend 33 | 34 | @end 35 | @implementation ContentModel 36 | 37 | @end 38 | @implementation Middle_image 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/model/DataModel.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Copyright 2018 WHC_DataModelFactory 5 | * Auto-generated: 2018-02-05 11:56:28 6 | * 7 | * @author netyouli (whc) 8 | * @website http://wuhaichao.com 9 | * @github https://github.com/netyouli 10 | */ 11 | 12 | 13 | #import "ContentModel.h" 14 | 15 | @interface Sub_entrance_list :NSObject 16 | 17 | @end 18 | 19 | @interface Tips :NSObject 20 | @property (nonatomic , copy) NSString * display_template; 21 | @property (nonatomic , assign) NSInteger display_duration; 22 | @property (nonatomic , copy) NSString * display_info; 23 | @property (nonatomic , copy) NSString * web_url; 24 | @property (nonatomic , copy) NSString * download_url; 25 | @property (nonatomic , copy) NSString * type; 26 | @property (nonatomic , copy) NSString * open_url; 27 | @property (nonatomic , copy) NSString * app_name; 28 | @property (nonatomic , copy) NSString * package_name; 29 | 30 | @end 31 | 32 | @interface Data :NSObject 33 | @property (nonatomic,copy) NSString * content; 34 | @property (nonatomic,copy) NSString * code; 35 | @property (nonatomic,strong) NSDictionary * model; 36 | 37 | @property (nonatomic,strong) NSNumber * cellHeight; 38 | @property (nonatomic,assign) BOOL RightX124; 39 | 40 | -(CGFloat)middle_image_MarginR; 41 | -(CGFloat)middle_image_W; 42 | -(CGFloat)middle_image_H; 43 | 44 | -(BOOL)hasMiddle_image; 45 | -(BOOL)hasImage_list; 46 | 47 | 48 | @end 49 | 50 | @interface DataModel :NSObject 51 | 52 | @property (nonatomic , copy) NSArray * sub_entrance_list; 53 | @property (nonatomic , assign) NSInteger show_et_status; 54 | @property (nonatomic , copy) NSString * message; 55 | @property (nonatomic , assign) BOOL has_more; 56 | @property (nonatomic , copy) NSString * post_content_hint; 57 | @property (nonatomic , assign) BOOL has_more_to_refresh; 58 | @property (nonatomic , assign) NSInteger feed_flag; 59 | @property (nonatomic , assign) NSInteger total_number; 60 | @property (nonatomic , strong) Tips * tips; 61 | @property (nonatomic , copy) NSMutableArray * data; 62 | @property (nonatomic , assign) NSInteger login_status; 63 | @property (nonatomic , assign) NSInteger action_to_last_stick; 64 | 65 | @end 66 | 67 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/model/DataModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // DataModel.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/5. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "DataModel.h" 10 | 11 | @implementation Sub_entrance_list 12 | 13 | @end 14 | @implementation Tips 15 | 16 | @end 17 | @implementation Data 18 | /*! 19 | * @brief 把格式化的JSON格式的字符串转换成字典 20 | * @param jsonString JSON格式的字符串 21 | * @return 返回字典 22 | */ 23 | + (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString { 24 | if (jsonString == nil) { 25 | return nil; 26 | } 27 | 28 | NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; 29 | NSError *err; 30 | NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData 31 | options:NSJSONReadingMutableContainers 32 | error:&err]; 33 | if(err) { 34 | NSLog(@"json解析失败:%@",err); 35 | return nil; 36 | } 37 | return dic; 38 | } 39 | -(NSDictionary *)model 40 | { 41 | 42 | if (!_model) { 43 | id obj = [Data dictionaryWithJsonString:self.content]; 44 | _model = obj; 45 | } 46 | return _model; 47 | } 48 | 49 | -(BOOL)hasMiddle_image 50 | { 51 | id middle_image = self.model[@"middle_image"]; 52 | if (middle_image) { 53 | return YES; 54 | } 55 | return NO; 56 | } 57 | -(BOOL)hasImage_list 58 | { 59 | id image_list = self.model[@"image_list"]; 60 | if (image_list) { 61 | return YES; 62 | } 63 | return NO; 64 | } 65 | 66 | -(CGFloat)middle_image_H 67 | { 68 | if ([self hasMiddle_image]) { 69 | CGFloat w = [self middle_image_W]; 70 | id middle_image = self.model[@"middle_image"]; 71 | float width = [middle_image[@"width"] floatValue]; 72 | float height = [middle_image[@"height"] floatValue]; 73 | CGFloat h = w *height/width; 74 | return h; 75 | } 76 | 77 | return 0; 78 | } 79 | -(CGFloat)middle_image_W 80 | { 81 | CGFloat w = 0; 82 | 83 | if ([self hasMiddle_image]) { 84 | w=124; 85 | return w; 86 | } 87 | 88 | return w; 89 | } 90 | -(CGFloat)middle_image_MarginR 91 | { 92 | CGFloat w = 0; 93 | 94 | if ([self hasMiddle_image]) { 95 | w=10; 96 | return w; 97 | } 98 | 99 | return w; 100 | } 101 | 102 | -(NSNumber *)cellHeight 103 | { 104 | if (!_cellHeight) { 105 | _cellHeight = @([self Cell_height]); 106 | } 107 | return _cellHeight; 108 | } 109 | 110 | -(BOOL)RightX124 111 | { 112 | NSString * title = self.model[@"title"]; 113 | if ([self hasMiddle_image]) { 114 | CGFloat w = SCREEN_WIDTH - (10+10+10+124); 115 | CGFloat title_h = [title heightForFont:[UIFont systemFontOfSize:16] width:w]; 116 | CGFloat leftImgH = [self middle_image_H]; 117 | if (leftImgH-title_h>26) { 118 | 119 | return YES; 120 | } 121 | 122 | } 123 | return NO; 124 | } 125 | 126 | -(CGFloat)Cell_height 127 | { 128 | NSString * title = self.model[@"title"]; 129 | 130 | if ([self hasImage_list]) { 131 | CGFloat w = SCREEN_WIDTH - (10+10); 132 | CGFloat title_h = [title heightForFont:[UIFont systemFontOfSize:16] width:w]; 133 | if ([self.model[@"image_list"] count]==3) { 134 | return title_h+10+125; 135 | }else{ 136 | return title_h+10+234; 137 | } 138 | 139 | 140 | } 141 | 142 | if ([self hasMiddle_image]) { 143 | CGFloat w = SCREEN_WIDTH - (10+10+10+124); 144 | CGFloat title_h = [title heightForFont:[UIFont systemFontOfSize:16] width:w]; 145 | CGFloat leftImgH = [self middle_image_H]; 146 | if (leftImgH-title_h>26) { 147 | self.RightX124 = YES; 148 | return leftImgH+10+10; 149 | } 150 | self.RightX124 = NO; 151 | CGFloat maxH = MAX(title_h, leftImgH); 152 | return maxH+10+36; 153 | }else{ 154 | 155 | if (self.model[@"background"][@"video"][@"covers"]) { 156 | CGFloat w = SCREEN_WIDTH - (10+10); 157 | CGFloat title_h = [title heightForFont:[UIFont systemFontOfSize:16] width:w]; 158 | return title_h+224+44; 159 | } 160 | 161 | 162 | CGFloat w = SCREEN_WIDTH - (10+10); 163 | CGFloat title_h = [title heightForFont:[UIFont systemFontOfSize:16] width:w]; 164 | return title_h+10+36; 165 | } 166 | 167 | 168 | 169 | return 1000; 170 | } 171 | 172 | @end 173 | @implementation DataModel 174 | 175 | + (NSDictionary *)modelContainerPropertyGenericClass { 176 | // value should be Class or Class name. 177 | return @{@"data" : [Data class]}; 178 | } 179 | 180 | @end 181 | 182 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/vc/BaseChirldViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BaseChirldViewController.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | #import "DataModel.h" 9 | #import 10 | 11 | @interface BaseChirldViewController : UIViewController 12 | @property (nonatomic,strong) T1Data * tModel111; 13 | @property (nonatomic,strong) NSMutableArray * dataArray; 14 | -(void)loadData; 15 | -(void)updateUI; 16 | @end 17 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/vc/CDViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CDViewController.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "BaseChirldViewController.h" 10 | 11 | @interface CDViewController :BaseChirldViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/vc/CDViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CDViewController.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "DetailZBViewController.h" 10 | #import "TWTableViewCell.h" 11 | 12 | 13 | #import "CDViewController.h" 14 | 15 | @interface CDViewController () 16 | { 17 | CGFloat _y; 18 | } 19 | @property (nonatomic,strong) DataModel * sorceModel; 20 | 21 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 22 | 23 | 24 | 25 | @end 26 | 27 | @implementation CDViewController 28 | 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | } 32 | -(UIScrollView * )getScrollViewAddRefreshAndFooter 33 | { 34 | return self.tableView; 35 | } 36 | -(void)updateUI 37 | { 38 | [self.tableView reloadData]; 39 | } 40 | 41 | 42 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 43 | { 44 | return self.dataArray.count; 45 | } 46 | 47 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 48 | { 49 | 50 | 51 | NSString * CellInentifer = @"ImgLeftTableViewCell"; 52 | NSInteger flag = [[self class] JudgeNumWithDataArr:self.dataArray IndexPath:indexPath]; 53 | 54 | switch (flag) { 55 | case 0: 56 | { 57 | CellInentifer = @"ImgLeftTableViewCell"; 58 | } 59 | break; 60 | case 1: 61 | { 62 | CellInentifer = @"ImgBottomTableViewCell"; 63 | } 64 | break; 65 | case 2: 66 | { 67 | CellInentifer = @"ImgBottomOneTableViewCell"; 68 | } 69 | break; 70 | case 3: 71 | { 72 | CellInentifer = @"ZhiBoTableViewCell"; 73 | } 74 | break; 75 | 76 | default: 77 | { 78 | CellInentifer = @"ImgLeftTableViewCell"; 79 | } 80 | break; 81 | } 82 | 83 | 84 | TWTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:CellInentifer]; 85 | 86 | if (!cell) { 87 | cell = [[NSBundle mainBundle] loadNibNamed:CellInentifer owner:self options:nil][0]; 88 | } 89 | 90 | [cell setArr:self.dataArray indexPath:indexPath]; 91 | 92 | return cell; 93 | } 94 | 95 | /** 96 | 判断是什么类型的 97 | 98 | @param dataArray 数组 99 | @param indexPath 索引 100 | @return 0 左边文字右边图片 1 下边三张图片 2下面一张图片 3 直播 101 | */ 102 | +(NSInteger)JudgeNumWithDataArr:(NSMutableArray *)dataArray IndexPath:(NSIndexPath *)indexPath 103 | { 104 | Data* obj = dataArray[indexPath.row]; 105 | 106 | 107 | if ([obj hasImage_list]) { 108 | NSInteger count = [obj.model[@"image_list"] count]; 109 | if (count==3) { 110 | return 1; 111 | } 112 | if (count==1) { 113 | return 2; 114 | } 115 | 116 | }else{ 117 | 118 | 119 | if (obj.model[@"background"][@"video"][@"covers"]) { 120 | return 3; 121 | }else{ 122 | return 0; 123 | } 124 | } 125 | 126 | return 0; 127 | 128 | } 129 | 130 | 131 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 132 | { 133 | Data* obj = self.dataArray[indexPath.row]; 134 | return [obj.cellHeight floatValue]; 135 | } 136 | 137 | -(void)scrollViewDidScroll:(UIScrollView *)scrollView 138 | { 139 | CGFloat agoY = _y; 140 | CGFloat nowY = scrollView.contentOffset.y; 141 | 142 | if (nowY - agoY >0) { 143 | // 向上 144 | 145 | }else{ 146 | // 乡下 147 | } 148 | } 149 | - (void)didReceiveMemoryWarning { 150 | [super didReceiveMemoryWarning]; 151 | } 152 | 153 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 154 | { 155 | 156 | NSInteger flag = [[self class] JudgeNumWithDataArr:self.dataArray IndexPath:indexPath]; 157 | Data* obj = self.dataArray[indexPath.row]; 158 | 159 | switch (flag) { 160 | case 0: 161 | { 162 | 163 | } 164 | break; 165 | case 1: 166 | { 167 | 168 | } 169 | break; 170 | case 2: 171 | { 172 | 173 | } 174 | break; 175 | case 3: 176 | { 177 | // 直播 178 | DetailZBViewController * vc = [self.storyboard instantiateViewControllerWithIdentifier:@"DetailZBViewController"]; 179 | vc.live_id = obj.model[@"live_id"]; 180 | 181 | self.navigationController.hidesBottomBarWhenPushed = YES; 182 | self.navigationController.navigationBarHidden = YES; 183 | 184 | [self.navigationController pushViewController:vc animated:YES]; 185 | } 186 | break; 187 | 188 | default: 189 | { 190 | 191 | } 192 | break; 193 | } 194 | 195 | 196 | 197 | 198 | } 199 | 200 | 201 | 202 | 203 | @end 204 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/vc/SmallVideoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SmallVideoViewController.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "BaseChirldViewController.h" 10 | 11 | @interface SmallVideoViewController : BaseChirldViewController 12 | @property (weak, nonatomic) IBOutlet UICollectionView *collectionView; 13 | @property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *flowLayout; 14 | 15 | @property (nonatomic,strong) UIImageView * curretnImageView; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/ChilderVC/vc/SmallVideoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SmallVideoViewController.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | 10 | #import "SmalVideoCollectionViewCell.h" 11 | #import "PlaybackView.h" 12 | #import 13 | #import "SmallVideoViewModel.h" 14 | #import "SmallVideoViewController.h" 15 | 16 | @interface SmallVideoViewController () 17 | @property (nonatomic,strong) AVPlayer *player; 18 | @property (nonatomic,copy) NSString * urlVideo; 19 | @property (nonatomic,strong) SmallVideoViewModel * viewModel; 20 | @end 21 | 22 | @implementation SmallVideoViewController 23 | 24 | -(UIImageView *)curretnImageView 25 | { 26 | if (!_curretnImageView) { 27 | _curretnImageView = [UIImageView new]; 28 | 29 | _curretnImageView.contentMode = UIViewContentModeScaleAspectFill; 30 | UIWindow * window = [UIApplication sharedApplication].keyWindow; 31 | _curretnImageView.hidden = YES; 32 | [window addSubview:_curretnImageView]; 33 | } 34 | return _curretnImageView; 35 | } 36 | 37 | -(SmallVideoViewModel *)viewModel 38 | { 39 | if (!_viewModel) { 40 | _viewModel = [SmallVideoViewModel new]; 41 | } 42 | return _viewModel; 43 | } 44 | 45 | #pragma mark - 懒加载代码 46 | - (AVPlayer *)player 47 | { 48 | NSURL *url = [NSURL URLWithString:self.urlVideo]; 49 | if (_player == nil) { 50 | // 1.获取URL(远程/本地) 51 | // NSURL *url = [[NSBundle mainBundle] URLForResource:@"01-知识回顾.mp4" withExtension:nil]; 52 | 53 | 54 | // 2.创建AVPlayerItem 55 | AVPlayerItem *item = [AVPlayerItem playerItemWithURL:url]; 56 | 57 | // 3.创建AVPlayer 58 | _player = [AVPlayer playerWithPlayerItem:item]; 59 | 60 | // 4.添加AVPlayerLayer 61 | AVPlayerLayer *layer = [AVPlayerLayer playerLayerWithPlayer:self.player]; 62 | layer.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.width * 9 / 16); 63 | [self.view.layer addSublayer:layer]; 64 | }else{ 65 | // 2.创建AVPlayerItem 66 | AVPlayerItem *item = [AVPlayerItem playerItemWithURL:url]; 67 | [_player replaceCurrentItemWithPlayerItem:item]; 68 | } 69 | return _player; 70 | } 71 | 72 | - (void)viewDidLoad { 73 | [super viewDidLoad]; 74 | // Do any additional setup after loading the view. 75 | NSInteger coll = 2; 76 | CGFloat itemSpace = 2; 77 | CGFloat itemW = (SCREEN_WIDTH - itemSpace*(coll-1))/coll; 78 | CGFloat itemH = itemW *1.5; 79 | self.flowLayout.minimumLineSpacing = itemSpace; 80 | self.flowLayout.minimumInteritemSpacing = itemSpace; 81 | self.flowLayout.itemSize = CGSizeMake(itemW, itemH); 82 | 83 | 84 | __weak typeof(self) weakSelf = self; 85 | [self.viewModel setCollectionView:self.collectionView datayArray:self.dataArray cellIdentifer:@"SmalVideoCollectionViewCell" didSelectedBlock:^(NSIndexPath *idxPath, NSMutableArray *dataArray) { 86 | 87 | 88 | [weakSelf showImgViewAnimationIndexPath:idxPath isOpen:YES]; 89 | 90 | 91 | }]; 92 | } 93 | 94 | -(void)showImgViewAnimationIndexPath:(NSIndexPath *)indexPath isOpen:(BOOL)isOpen 95 | { 96 | 97 | SmalVideoCollectionViewCell * cell = (SmalVideoCollectionViewCell *)[self.collectionView cellForItemAtIndexPath:indexPath]; 98 | 99 | 100 | cell = (SmalVideoCollectionViewCell *)[self.collectionView cellForItemAtIndexPath:indexPath]; 101 | UIWindow * w = [UIApplication sharedApplication].keyWindow; 102 | CGRect rect = [self.collectionView convertRect:cell.frame toView:w]; 103 | self.curretnImageView.image = cell.bgImageView.image; 104 | self.curretnImageView.frame = isOpen==YES? rect:w.bounds; 105 | self.curretnImageView.hidden = NO; 106 | __weak typeof(self) weakSelf = self; 107 | [UIView animateWithDuration:0.5 animations:^{ 108 | self.curretnImageView.frame = isOpen==YES? w.bounds:rect; 109 | } completion:^(BOOL finished) { 110 | 111 | if (isOpen) { 112 | [PlaybackView showData:self.dataArray fromIdx:indexPath.row closeBlock:^(BOOL isClose, NSIndexPath *indexPath) { 113 | if (isClose) { 114 | [weakSelf showImgViewAnimationIndexPath:indexPath isOpen:NO]; 115 | }else{ 116 | [weakSelf.collectionView scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionCenteredVertically animated:YES]; 117 | } 118 | 119 | }] ; 120 | } 121 | 122 | weakSelf.curretnImageView.hidden = YES; 123 | }]; 124 | 125 | 126 | 127 | } 128 | 129 | -(UIScrollView * )getScrollViewAddRefreshAndFooter 130 | { 131 | return self.collectionView; 132 | } 133 | -(void)updateUI 134 | { 135 | [self.viewModel updateData:self.dataArray]; 136 | 137 | [PlaybackView updateData:self.dataArray]; 138 | 139 | } 140 | 141 | - (void)didReceiveMemoryWarning { 142 | [super didReceiveMemoryWarning]; 143 | // Dispose of any resources that can be recreated. 144 | } 145 | 146 | /* 147 | #pragma mark - Navigation 148 | 149 | // In a storyboard-based application, you will often want to do a little preparation before navigation 150 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 151 | // Get the new view controller using [segue destinationViewController]. 152 | // Pass the selected object to the new view controller. 153 | } 154 | */ 155 | 156 | @end 157 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/HomeViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HomeViewController.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/29. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HomeViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/HomeViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HomeViewController.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/29. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | 10 | #import "TitleModel.h" 11 | #import "HomeMenuCollectionViewCell.h" 12 | #import "HomeMenuView.h" 13 | 14 | #import "HomeViewController.h" 15 | 16 | @interface HomeViewController () 17 | @property (weak, nonatomic) IBOutlet UIView *MenuBottomView; 18 | @property (weak, nonatomic) IBOutlet UIScrollView *scrollView; 19 | 20 | @property (nonatomic,strong) HomeMenuView * menuView; 21 | 22 | @property (nonatomic,assign) NSInteger selectedIdx; 23 | 24 | @property (nonatomic,strong) NSMutableArray * titleArray; 25 | 26 | @property (nonatomic,assign) BOOL isShou; 27 | @end 28 | 29 | @implementation HomeViewController 30 | -(NSMutableArray *)titleArray 31 | { 32 | if (!_titleArray) { 33 | _titleArray = [NSMutableArray new]; 34 | } 35 | return _titleArray; 36 | } 37 | 38 | -(HomeMenuView *)menuView 39 | { 40 | if(!_menuView){ 41 | __weak typeof(self) weakSelf = self; 42 | _menuView = [HomeMenuView getViewWithNibSelectedBlock:^(NSIndexPath *idxPath, NSMutableArray *dataArray) { 43 | weakSelf.isShou = NO; 44 | weakSelf.selectedIdx = idxPath.row; 45 | [weakSelf changeVC:idxPath.row]; 46 | } cellIdentifer:@"HomeMenuCollectionViewCell"]; 47 | } 48 | 49 | return _menuView; 50 | } 51 | - (void)viewDidLoad { 52 | [super viewDidLoad]; 53 | // Do any additional setup after loading the view, typically from a nib. 54 | 55 | 56 | [PPNetworkHelper GET:@"http://is.snssdk.com/article/category/get_subscribed/v2/?iid=25504462036&device_id=43911586446&ac=wifi&channel=iphone6&aid=13&app_name=news_article&version_code=659&version_name=6.5.9&device_platform=ios&ab_version=275263%2C276222%2C271178%2C208278%2C252767%2C249828%2C246859%2C275644%2C268839%2C276183%2C249686%2C249675%2C264842%2C268794%2C249667%2C274584%2C206075%2C249674%2C272432%2C229304%2C276049%2C270947%2C271842%2C275587%2C275947%2C266386%2C271717%2C260441%2C240865%2C274670%2C270388%2C276002%2C251713%2C271059%2C274344%2C275066%2C229399%2C276128%2C270333%2C275347%2C274131%2C267093%2C274411%2C270107%2C258356%2C247848%2C264452%2C276173%2C249045%2C271663%2C244746%2C273961%2C274292%2C264616%2C275350%2C276211%2C268788%2C260656%2C261944%2C241181%2C268341%2C232362%2C265709%2C271194%2C273233%2C239096%2C272011%2C170988%2C269425%2C273499%2C268663%2C275295%2C243585%2C276203%2C272515%2C272486%2C257280%2C261294%2C265122%2C258603&ab_client=a1%2Cc4%2Ce1%2Cf2%2Cg2%2Cf7&ab_feature=94563%2C102749&abflag=3&ssmix=a&device_type=BAC-AL00&device_brand=HUAWEI&language=zh&os_api=24&os_version=7.0&uuid=866432038206049&openudid=50468f33e8fc72cf&manifest_version_code=659&resolution=720*1208&dpi=320&update_version_code=65902&_rticket=1517897403139&plugin=10575&fp=42TqLlm1Pr5_FlHtLrU1FlFSF2Qq&pos=5r_-9Onkv6e_dBoQeCcbeCUfv7G_8fLz-vTp6Pn4v6esrauzqKuur6-rsb_x_On06ej5-L-nr6SzqK6pqa-v4A%3D%3D&rom_version=emotionui_5.1_bac-al00c00b180&ts=1517897403&as=a28564971bcb0a96294897&mas=00d821575ea3fde5405dd395344d4d8767ad8250edd6552d73" parameters:@{} success:^(id responseObject) { 57 | 58 | TitleModel * model = [TitleModel yy_modelWithDictionary:responseObject]; 59 | T1Data * obj = [T1Data new]; 60 | obj.category = @""; 61 | obj.name = @"推荐"; 62 | obj.web_url = @""; 63 | obj.flags = 0; 64 | obj.tip_new = 0; 65 | obj.default_add = 1; 66 | obj.concern_id = @""; 67 | obj.type = 4; 68 | obj.icon_url = @""; 69 | NSMutableArray * tempArr = [model.data.data mutableCopy]; 70 | [tempArr insertObject:obj atIndex:0]; 71 | [self.titleArray setArray:tempArr]; 72 | 73 | 74 | dispatch_async(dispatch_get_main_queue(), ^{ 75 | // 通知主线程刷新 神马的 76 | [self updateVC]; 77 | }); 78 | 79 | 80 | 81 | 82 | 83 | } failure:^(NSError *error) { 84 | 85 | }]; 86 | 87 | 88 | [self.view addSubview:self.menuView]; 89 | 90 | __weak typeof(self) weakSelf = self; 91 | [self.menuView mas_makeConstraints:^(MASConstraintMaker *make) { 92 | make.top.equalTo(weakSelf.MenuBottomView); 93 | make.left.equalTo(weakSelf.MenuBottomView); 94 | make.right.equalTo(weakSelf.MenuBottomView); 95 | make.bottom.equalTo(weakSelf.MenuBottomView).offset(-1); 96 | }]; 97 | 98 | 99 | 100 | self.scrollView.delegate = self; 101 | self.scrollView.bounces = NO; 102 | 103 | } 104 | 105 | 106 | -(void)updateVC 107 | { 108 | [self.menuView.viewModel updateData:self.titleArray]; 109 | // 跟视图控制器 110 | 111 | for (UIViewController * vc in self.childViewControllers) { 112 | 113 | [vc.view removeFromSuperview]; 114 | [vc removeFromParentViewController]; 115 | } 116 | 117 | for (T1Data * dd in self.titleArray) { 118 | UIViewController * vc; 119 | if ([dd.category isEqualToString:@"hotsoon_video"]) { 120 | vc = [self.storyboard instantiateViewControllerWithIdentifier:@"SmallVideoViewController"]; 121 | }else{ 122 | vc = [self.storyboard instantiateViewControllerWithIdentifier:@"CDViewController"]; 123 | } 124 | 125 | vc.title = dd.name; 126 | vc.tModel111 = dd; 127 | [self addChildViewController:vc]; 128 | 129 | } 130 | self.scrollView.contentSize = CGSizeMake(SCREEN_WIDTH*self.titleArray.count, self.scrollView.height); 131 | [self changeVC:0]; 132 | } 133 | 134 | 135 | -(void)changeVC:(NSInteger)idx 136 | { 137 | CGFloat left = idx*SCREEN_WIDTH; 138 | [self.scrollView setContentOffset:CGPointMake(left, 0) animated:YES]; 139 | 140 | [self addVC:idx]; 141 | } 142 | -(void)addVC:(NSInteger)idx 143 | { 144 | CGFloat left = idx*SCREEN_WIDTH; 145 | 146 | UIViewController * vc = self.childViewControllers[idx]; 147 | if (vc.view.superview) { 148 | return; 149 | } 150 | 151 | [self.scrollView addSubview:vc.view]; 152 | vc.view.frame = CGRectMake(left, 0, SCREEN_WIDTH, self.scrollView.height); 153 | 154 | vc.view.backgroundColor = [UIColor colorWithWholeRed:arc4random()%255 green:arc4random()%255 blue:arc4random()%255]; 155 | } 156 | - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView 157 | { 158 | self.isShou = YES; 159 | } 160 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView 161 | { 162 | if (!self.isShou) { 163 | return; 164 | 165 | } 166 | // scrollView 167 | 168 | CGFloat idx = scrollView.contentOffset.x/SCREEN_WIDTH; 169 | 170 | 171 | 172 | if (idx-self.selectedIdx>0&&idx-self.selectedIdx<1) { 173 | if (idx+1<=self.childViewControllers.count) { 174 | [self addVC:idx+1]; 175 | CGFloat d =fabsf(idx-self.selectedIdx) ; 176 | NSLog(@"====%f",d); 177 | HomeMenuCollectionViewCell * cell1 = [self getCellWithIdex:self.selectedIdx+1]; 178 | HomeMenuCollectionViewCell * cell = [self getCellWithIdex:self.selectedIdx]; 179 | 180 | [self fromCell:cell toCell1:cell1 d:d]; 181 | 182 | } 183 | 184 | }else if (idx-self.selectedIdx<=0&&idx-self.selectedIdx>=-1){ 185 | if (idx>=0) { 186 | [self addVC:idx]; 187 | HomeMenuCollectionViewCell * cell1 = [self getCellWithIdex:self.selectedIdx-1]; 188 | HomeMenuCollectionViewCell * cell = [self getCellWithIdex:self.selectedIdx]; 189 | CGFloat d =fabsf(idx-self.selectedIdx) ; 190 | [self fromCell:cell toCell1:cell1 d:d]; 191 | } 192 | 193 | } 194 | 195 | 196 | 197 | 198 | } 199 | 200 | -(void)fromCell:(HomeMenuCollectionViewCell*)cell toCell1:(HomeMenuCollectionViewCell*)cell1 d:(CGFloat)d 201 | { 202 | 203 | cell.title.font = [UIFont systemFontOfSize:16-d]; 204 | cell.title.textColor = RGB(249-d*(249-34),118-(118-34)*d,118-(118-34)*d); 205 | cell1.title.font = [UIFont systemFontOfSize:15+d]; 206 | cell1.title.textColor = RGB(34+d*(249-34),34+(118-34)*d,34+(118-34)*d); 207 | } 208 | 209 | 210 | -(HomeMenuCollectionViewCell*)getCellWithIdex:(NSInteger)idx 211 | { 212 | NSIndexPath * idxPath = [NSIndexPath indexPathForRow:idx inSection:0]; 213 | HomeMenuCollectionViewCell * cell = (HomeMenuCollectionViewCell *)[self.menuView.collectionView cellForItemAtIndexPath:idxPath]; 214 | return cell; 215 | } 216 | 217 | 218 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView 219 | { 220 | NSInteger idx = scrollView.contentOffset.x/SCREEN_WIDTH; 221 | 222 | // HomeMenuCollectionViewCell * cell1 = [self getCellWithIdex:self.selectedIdx]; 223 | // cell1.selected = NO; 224 | 225 | self.selectedIdx = idx; 226 | [self.menuView clickIdx:idx]; 227 | 228 | } 229 | 230 | 231 | - (void)didReceiveMemoryWarning { 232 | [super didReceiveMemoryWarning]; 233 | // Dispose of any resources that can be recreated. 234 | } 235 | 236 | /* 237 | #pragma mark - Navigation 238 | 239 | // In a storyboard-based application, you will often want to do a little preparation before navigation 240 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 241 | // Get the new view controller using [segue destinationViewController]. 242 | // Pass the selected object to the new view controller. 243 | } 244 | */ 245 | 246 | @end 247 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/Model/TitleModel.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Copyright 2018 WHC_DataModelFactory 5 | * Auto-generated: 2018-02-06 14:18:47 6 | * 7 | * @author netyouli (whc) 8 | * @website http://wuhaichao.com 9 | * @github https://github.com/netyouli 10 | */ 11 | 12 | 13 | 14 | @interface T1Data :NSObject 15 | @property (nonatomic , copy) NSString * category; 16 | @property (nonatomic , assign) NSInteger tip_new; 17 | @property (nonatomic , assign) NSInteger default_add; 18 | @property (nonatomic , copy) NSString * web_url; 19 | @property (nonatomic , copy) NSString * concern_id; 20 | @property (nonatomic , copy) NSString * icon_url; 21 | @property (nonatomic , assign) NSInteger flags; 22 | @property (nonatomic , assign) NSInteger type; 23 | @property (nonatomic , copy) NSString * name; 24 | 25 | @end 26 | 27 | @interface Pre_data :NSObject 28 | 29 | @end 30 | 31 | @interface TTData :NSObject 32 | @property (nonatomic , copy) NSString * version; 33 | @property (nonatomic , copy) NSMutableArray * data; 34 | @property (nonatomic , copy) NSArray * pre_data; 35 | 36 | @end 37 | 38 | @interface TitleModel :NSObject 39 | @property (nonatomic , copy) NSString * message; 40 | @property (nonatomic , strong) TTData * data; 41 | 42 | @end 43 | 44 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/Model/TitleModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // TitleModel.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "TitleModel.h" 11 | 12 | @implementation T1Data 13 | 14 | @end 15 | @implementation Pre_data 16 | 17 | @end 18 | @implementation TTData 19 | + (NSDictionary *)modelContainerPropertyGenericClass { 20 | // value should be Class or Class name. 21 | return @{@"data" : [T1Data class], 22 | @"pre_data" : [Pre_data class], 23 | }; 24 | } 25 | 26 | @end 27 | @implementation TitleModel 28 | + (NSDictionary *)modelContainerPropertyGenericClass { 29 | // value should be Class or Class name. 30 | return @{@"data" : [TTData class] 31 | }; 32 | } 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/Cell/HomeMenuCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // HomeMenuCollectionViewCell.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HomeMenuCollectionViewCell : UICollectionViewCell 12 | @property (weak, nonatomic) IBOutlet UILabel *title; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/Cell/HomeMenuCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // HomeMenuCollectionViewCell.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | 10 | #import "TitleModel.h" 11 | #import "HomeMenuCollectionViewCell.h" 12 | 13 | @implementation HomeMenuCollectionViewCell 14 | 15 | - (void)awakeFromNib { 16 | [super awakeFromNib]; 17 | // Initialization code 18 | } 19 | 20 | -(void)bindData:(id)data indexPath:(NSIndexPath *)indexPath 21 | { 22 | T1Data * title = data[indexPath.row]; 23 | self.title.text = title.name; 24 | } 25 | -(void)setSelected:(BOOL)selected 26 | { 27 | [super setSelected:selected]; 28 | if (selected) { 29 | self.title.textColor = RGB(249,118,118); 30 | self.title.font = [UIFont systemFontOfSize:16]; 31 | }else{ 32 | self.title.textColor = RGB(34,34,34); 33 | self.title.font = [UIFont systemFontOfSize:15]; 34 | } 35 | } 36 | 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/Cell/HomeMenuCollectionViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/HomeMenuView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HomeMenuView.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "CollectionViewModel.h" 12 | 13 | 14 | @interface HomeMenuView : UIView 15 | @property (weak, nonatomic) IBOutlet UICollectionView *collectionView; 16 | @property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *flowLayout; 17 | @property (nonatomic,strong) CollectionViewModel * viewModel; 18 | 19 | +(instancetype)getViewWithNibSelectedBlock:(didSelectedBlock)SelectedBlock; 20 | 21 | +(instancetype)getViewWithNibSelectedBlock:(didSelectedBlock)SelectedBlock cellIdentifer:(NSString *)cellIdentifer; 22 | -(void)clickIdx:(NSInteger)idx; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/HomeMenuView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HomeMenuView.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "HomeMenuView.h" 10 | 11 | @interface HomeMenuView() 12 | 13 | 14 | 15 | @end 16 | 17 | 18 | @implementation HomeMenuView 19 | 20 | -(CollectionViewModel *)viewModel 21 | { 22 | if (!_viewModel) { 23 | _viewModel = [CollectionViewModel new]; 24 | } 25 | return _viewModel; 26 | } 27 | 28 | 29 | 30 | -(void)awakeFromNib 31 | { 32 | [super awakeFromNib]; 33 | 34 | // self.flowLayout.itemSize = CGSizeMake(20, 20); 35 | 36 | } 37 | +(instancetype)getViewWithNibSelectedBlock:(didSelectedBlock)SelectedBlock cellIdentifer:(NSString *)cellIdentifer 38 | { 39 | HomeMenuView * view = [self getViewWithNib]; 40 | 41 | [view.viewModel setCollectionView:view.collectionView datayArray:@[].mutableCopy cellIdentifer:cellIdentifer didSelectedBlock:SelectedBlock]; 42 | return view; 43 | } 44 | +(instancetype)getViewWithNibSelectedBlock:(didSelectedBlock)SelectedBlock 45 | { 46 | HomeMenuView * view = [self getViewWithNib]; 47 | 48 | [view.viewModel setCollectionView:view.collectionView datayArray:@[].mutableCopy cellIdentifer:@"HomeMenuCollectionViewCell" didSelectedBlock:SelectedBlock]; 49 | return view; 50 | } 51 | 52 | 53 | -(void)clickIdx:(NSInteger)idx 54 | { 55 | [self.viewModel clickIdx:idx]; 56 | 57 | } 58 | 59 | +(instancetype)getViewWithNib 60 | { 61 | HomeMenuView * view = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:self options:nil][0]; 62 | 63 | 64 | return view; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/HomeMenuView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/View/PlaybackView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlaybackView.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/7. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | #import "PlayBackCollectionViewCell.h" 9 | #import 10 | #import "PlayBackViewModel.h" 11 | #import "BaseCollectionViewModel.h" 12 | #import 13 | 14 | 15 | 16 | 17 | 18 | @interface PlaybackView : UIView 19 | @property (weak, nonatomic) IBOutlet UICollectionView *collectionView; 20 | @property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *flowLayout; 21 | @property (nonatomic,assign) NSInteger fromIdx; 22 | @property (nonatomic,strong) PlayBackViewModel * viewModel; 23 | @property (nonatomic,strong) AVPlayer *player; 24 | @property (nonatomic,strong) AVPlayerLayer *Avlayer; 25 | @property (nonatomic,weak) PlayBackCollectionViewCell * currentCell; 26 | 27 | 28 | @property (nonatomic,copy) void (^CallBlcok)(BOOL isClose,NSIndexPath *indexPath); 29 | @property (nonatomic,strong) NSIndexPath * currentIndexPath; 30 | @property (nonatomic,copy) NSString * urlVideo; 31 | +(void)showData:(NSMutableArray *)data fromIdx:(NSInteger)fromIdx closeBlock:(void (^)(BOOL isClose,NSIndexPath *indexPath))CallBlcok; 32 | +(void)updateData:(NSMutableArray *)data; 33 | 34 | 35 | @end 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/View/PlaybackView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlaybackView.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/7. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | #import "DataModel.h" 9 | #import "PlaybackView.h" 10 | 11 | @interface PlaybackView() 12 | 13 | 14 | 15 | 16 | @end 17 | 18 | 19 | @implementation PlaybackView 20 | 21 | /* 22 | // Only override drawRect: if you perform custom drawing. 23 | // An empty implementation adversely affects performance during animation. 24 | - (void)drawRect:(CGRect)rect { 25 | // Drawing code 26 | } 27 | */ 28 | +(void)showData:(NSMutableArray *)data fromIdx:(NSInteger)fromIdx closeBlock:(void (^)(BOOL isClose,NSIndexPath *indexPath))CallBlcok 29 | { 30 | UIWindow * kewindow = [UIApplication sharedApplication].keyWindow; 31 | 32 | PlaybackView * view = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:self options:nil][0]; 33 | view.CallBlcok= CallBlcok; 34 | view.fromIdx = fromIdx; 35 | view.viewModel.fromIdx = fromIdx; 36 | 37 | view.tag = 1997; 38 | [view loadUI]; 39 | [view updateData:data]; 40 | 41 | 42 | view.frame = kewindow.bounds; 43 | [kewindow addSubview:view]; 44 | 45 | 46 | // NSIndexPath * newIndexPath = [NSIndexPath indexPathForRow:view.fromIdx inSection:0]; 47 | // [view playIdxPath:newIndexPath dataArray:data]; 48 | 49 | } 50 | 51 | 52 | 53 | -(PlayBackViewModel *)viewModel 54 | { 55 | if (!_viewModel) { 56 | _viewModel = [PlayBackViewModel new]; 57 | } 58 | return _viewModel; 59 | } 60 | -(void)awakeFromNib 61 | { 62 | 63 | [super awakeFromNib]; 64 | 65 | } 66 | 67 | -(void)loadUI 68 | { 69 | self.collectionView.backgroundColor = [UIColor clearColor]; 70 | self.flowLayout.minimumLineSpacing = 0.000000000001; 71 | self.flowLayout.minimumInteritemSpacing = 1; 72 | self.flowLayout.itemSize = CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT); 73 | 74 | self.collectionView.pagingEnabled = YES; 75 | __weak typeof(self) weakSelf = self; 76 | [self.viewModel setCollectionView:self.collectionView datayArray:@[].mutableCopy cellIdentifer:@"PlayBackCollectionViewCell" didSelectedBlock:^(NSIndexPath *idxPath, NSMutableArray *dataArray) { 77 | weakSelf.CallBlcok(NO, idxPath); 78 | [weakSelf playIdxPath:idxPath dataArray:dataArray]; 79 | }]; 80 | 81 | 82 | 83 | } 84 | 85 | -(void)playIdxPath:(NSIndexPath *)idxPath dataArray:(NSMutableArray *)dataArray 86 | { 87 | 88 | self.currentIndexPath = idxPath; 89 | self.currentCell = (PlayBackCollectionViewCell *)self.viewModel.currentCell; 90 | Data * dict = dataArray[idxPath.row]; 91 | 92 | NSArray * listVideo = dict.model[@"raw_data"][@"video"][@"play_addr"][@"url_list"]; 93 | if (listVideo) { 94 | if (listVideo.count>0) { 95 | NSLog(@"listVideo====%@",listVideo[0]); 96 | self.urlVideo = listVideo[0]; 97 | 98 | [self.player play]; 99 | 100 | [self removeNotification]; 101 | [self addNotification]; 102 | } 103 | 104 | 105 | } 106 | } 107 | 108 | 109 | +(void)updateData:(NSMutableArray *)data 110 | { 111 | 112 | PlaybackView * view = (PlaybackView *)[[UIApplication sharedApplication].keyWindow viewWithTag:1997]; 113 | if (view) { 114 | [view updateData:data]; 115 | } 116 | 117 | } 118 | 119 | -(void)updateData:(NSMutableArray *)data 120 | { 121 | 122 | [self.viewModel updateData:data]; 123 | } 124 | 125 | 126 | 127 | 128 | - (IBAction)close:(id)sender { 129 | 130 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 131 | [self removeFromSuperview]; 132 | 133 | 134 | if (self.CallBlcok) { 135 | self.CallBlcok(YES, self.currentIndexPath); 136 | } 137 | 138 | } 139 | 140 | 141 | #pragma mark - 懒加载代码 142 | -(AVPlayer *)player 143 | { 144 | NSURL *url = [NSURL URLWithString:self.urlVideo]; 145 | if (_player == nil) { 146 | // 1.获取URL(远程/本地) 147 | // NSURL *url = [[NSBundle mainBundle] URLForResource:@"01-知识回顾.mp4" withExtension:nil]; 148 | 149 | 150 | // 2.创建AVPlayerItem 151 | AVPlayerItem *item = [AVPlayerItem playerItemWithURL:url]; 152 | 153 | // 3.创建AVPlayer 154 | _player = [AVPlayer playerWithPlayerItem:item]; 155 | 156 | // 4.添加AVPlayerLayer 157 | AVPlayerLayer *layer = [AVPlayerLayer playerLayerWithPlayer:self.player]; 158 | layer.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height); 159 | self.Avlayer.backgroundColor = [UIColor redColor].CGColor; 160 | self.Avlayer = layer; 161 | self.Avlayer.videoGravity=AVLayerVideoGravityResizeAspectFill;//视频填充模式 162 | [self.currentCell.layer addSublayer:self.Avlayer]; 163 | 164 | 165 | 166 | }else{ 167 | if ([self.Avlayer.superlayer isEqual:self.currentCell.layer]) { 168 | 169 | }else{ 170 | // 2.创建AVPlayerItem 171 | AVPlayerItem *item = [AVPlayerItem playerItemWithURL:url]; 172 | _player = [AVPlayer playerWithPlayerItem:item]; 173 | self.Avlayer.player = _player; 174 | [self.Avlayer removeFromSuperlayer]; 175 | [self.currentCell.layer addSublayer:self.Avlayer]; 176 | 177 | } 178 | 179 | 180 | } 181 | 182 | 183 | return _player; 184 | } 185 | 186 | 187 | /** 188 | * 添加播放器通知 189 | */ 190 | -(void)addNotification{ 191 | //给AVPlayerItem添加播放完成通知 192 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackFinished:) name:AVPlayerItemDidPlayToEndTimeNotification object:self.player.currentItem]; 193 | } 194 | 195 | -(void)removeNotification{ 196 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 197 | } 198 | /** 199 | * 播放完成通知 200 | * 201 | * @param notification 通知对象 202 | */ 203 | -(void)playbackFinished:(NSNotification *)notification{ 204 | NSLog(@"视频播放完成."); 205 | 206 | 207 | // 播放完成后重复播放 208 | // 跳到最新的时间点开始播放 209 | [_player seekToTime:CMTimeMake(0, 1)]; 210 | [_player play]; 211 | } 212 | 213 | 214 | @end 215 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/View/PlaybackView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 38 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/View/ViewModel/PlayBackViewModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlayBackViewModel.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/7. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "BaseCollectionViewModel.h" 10 | 11 | @interface PlayBackViewModel : BaseCollectionViewModel 12 | 13 | @property (nonatomic,strong) UICollectionViewCell * currentCell; 14 | @property (nonatomic,assign) BOOL isFirst; 15 | @property (nonatomic,assign) NSInteger fromIdx; 16 | @end 17 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/View/ViewModel/PlayBackViewModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlayBackViewModel.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/7. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "PlayBackViewModel.h" 10 | 11 | @implementation PlayBackViewModel 12 | 13 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section; 14 | { 15 | return self.dataArray.count-self.fromIdx; 16 | } 17 | - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath 18 | 19 | { 20 | 21 | NSIndexPath * newIndexPath = [NSIndexPath indexPathForRow:indexPath.row+self.fromIdx inSection:indexPath.section]; 22 | 23 | UICollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:self.cellIdentifer forIndexPath:indexPath]; 24 | [cell bindData:self.dataArray indexPath:newIndexPath]; 25 | if (self.isFirst==NO) { 26 | self.isFirst = YES; 27 | 28 | 29 | if (self.callBlock) { 30 | self.currentCell = cell; 31 | self.callBlock(newIndexPath, self.dataArray); 32 | } 33 | 34 | } 35 | 36 | return cell; 37 | } 38 | 39 | -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath 40 | { 41 | // NSIndexPath * newIndexPath = [NSIndexPath indexPathForRow:indexPath.row+self.fromIdx inSection:indexPath.section]; 42 | // if (self.callBlock) { 43 | // self.callBlock(newIndexPath, self.dataArray); 44 | // } 45 | } 46 | 47 | -(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView 48 | { 49 | NSInteger currentR = scrollView.contentOffset.x/SCREEN_WIDTH; 50 | NSIndexPath * newIndexPath = [NSIndexPath indexPathForRow:currentR+self.fromIdx inSection:0]; 51 | NSIndexPath * newIndexPath1 = [NSIndexPath indexPathForRow:currentR inSection:0]; 52 | self.currentCell = [self.collectionView cellForItemAtIndexPath:newIndexPath1]; 53 | if (self.callBlock) { 54 | 55 | self.callBlock(newIndexPath, self.dataArray); 56 | } 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/View/cell/PlayBackCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlayBackCollectionViewCell.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/7. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PlayBackCollectionViewCell : UICollectionViewCell 12 | @property (weak, nonatomic) IBOutlet UIImageView *image; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/View/cell/PlayBackCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // PlayBackCollectionViewCell.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/7. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | #import "DataModel.h" 9 | #import "PlayBackCollectionViewCell.h" 10 | 11 | @implementation PlayBackCollectionViewCell 12 | 13 | - (void)awakeFromNib { 14 | [super awakeFromNib]; 15 | // Initialization code 16 | } 17 | -(void)bindData:(id)data indexPath:(NSIndexPath *)indexPath 18 | { 19 | Data * dict = data[indexPath.row]; 20 | 21 | NSString * title = dict.model[@"raw_data"][@"title"]; 22 | 23 | NSInteger digg_count = [dict.model[@"raw_data"][@"action"][@"digg_count"] integerValue]; 24 | 25 | 26 | 27 | NSDictionary * user = dict.model[@"raw_data"][@"user"]; 28 | NSString * avatar_url = user[@"info"][@"avatar_url"]; 29 | NSString * name = user[@"info"][@"name"]; 30 | 31 | 32 | NSArray * large_image_list = dict.model[@"raw_data"][@"large_image_list"]; 33 | NSString * url = @""; 34 | if (large_image_list) { 35 | url = large_image_list[0][@"url"]; 36 | url = [self imgUrl:url]; 37 | } 38 | 39 | [self.image sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:nil]; 40 | 41 | } 42 | 43 | -(NSString *)imgUrl:(NSString *)url 44 | { 45 | if ([url hasSuffix:@".webp"]) { 46 | url = [url stringByReplacingOccurrencesOfString:@".webp" withString:@".png"]; 47 | } 48 | 49 | return url; 50 | } 51 | @end 52 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/View/cell/PlayBackCollectionViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/ViewModel/CollectionViewModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // CollectionViewModel.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | 10 | #import "BaseCollectionViewModel.h" 11 | 12 | 13 | 14 | @interface CollectionViewModel : BaseCollectionViewModel 15 | 16 | 17 | 18 | -(void)clickIdx:(NSInteger)idx; 19 | 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /JRTTDemo/Class/Home/view/ViewModel/CollectionViewModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // CollectionViewModel.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "CollectionViewModel.h" 10 | 11 | @interface CollectionViewModel() 12 | 13 | 14 | 15 | @property (nonatomic,assign) NSInteger selectedIdx; 16 | @end 17 | 18 | @implementation CollectionViewModel 19 | 20 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section; 21 | { 22 | 23 | NSInteger count = self.dataArray.count; 24 | return count; 25 | } 26 | 27 | 28 | - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath 29 | 30 | { 31 | UICollectionViewCell * cell = [super collectionView:collectionView cellForItemAtIndexPath:indexPath]; 32 | cell.selected = self.selectedIdx == indexPath.row; 33 | return cell; 34 | } 35 | 36 | -(void)updateData:(NSMutableArray *)dataArray 37 | { 38 | [self.dataArray setArray: dataArray]; 39 | [self.collectionView reloadData]; 40 | } 41 | 42 | 43 | -(void)clickIdx:(NSInteger)idx 44 | { 45 | 46 | self.selectedIdx = idx; 47 | NSIndexPath * idxPath = [NSIndexPath indexPathForRow:idx inSection:0]; 48 | [self.collectionView scrollToItemAtIndexPath:idxPath atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally animated:YES]; 49 | [self.collectionView reloadData]; 50 | } 51 | 52 | -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath 53 | { 54 | if (self.callBlock) { 55 | self.selectedIdx = indexPath.row; 56 | [collectionView scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally animated:YES]; 57 | [collectionView reloadData]; 58 | self.callBlock(indexPath, self.dataArray); 59 | } 60 | } 61 | 62 | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath 63 | { 64 | 65 | id str = self.dataArray[indexPath.row]; 66 | 67 | if ([str isKindOfClass:[T1Data class]] ) { 68 | T1Data * str1 = (T1Data *)str; 69 | CGFloat w = [str1.name widthForFont:[UIFont systemFontOfSize:15]]; 70 | return CGSizeMake(w+10,30); 71 | } 72 | if ([str isKindOfClass:[NSString class]] ) { 73 | CGFloat w = [str widthForFont:[UIFont systemFontOfSize:15]]; 74 | return CGSizeMake(w+10,30); 75 | } 76 | 77 | // return CGSizeMake(w+10,30); 78 | return CGSizeMake(10,30); 79 | } 80 | - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section 81 | { 82 | return 0.0001; 83 | } 84 | - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section 85 | { 86 | return 0.001; 87 | } 88 | - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section 89 | { 90 | return UIEdgeInsetsMake(0, 0, 0, 40); 91 | } 92 | 93 | 94 | 95 | @end 96 | -------------------------------------------------------------------------------- /JRTTDemo/Class/TouTiao/TopView/AAACollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // AAACollectionViewCell.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "HomeMenuCollectionViewCell.h" 10 | 11 | @interface AAACollectionViewCell : HomeMenuCollectionViewCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/Class/TouTiao/TopView/AAACollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // AAACollectionViewCell.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "AAACollectionViewCell.h" 10 | 11 | @implementation AAACollectionViewCell 12 | 13 | - (void)awakeFromNib { 14 | [super awakeFromNib]; 15 | // Initialization code 16 | } 17 | -(void)bindData:(id)data indexPath:(NSIndexPath *)indexPath 18 | { 19 | NSString * title = data[indexPath.row]; 20 | self.title.text = title; 21 | } 22 | @end 23 | -------------------------------------------------------------------------------- /JRTTDemo/Class/TouTiao/TopView/AAACollectionViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /JRTTDemo/Class/TouTiao/TopView/SSHomeTopView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SSHomeTopView.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SSHomeTopView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/Class/TouTiao/TopView/SSHomeTopView.m: -------------------------------------------------------------------------------- 1 | // 2 | // SSHomeTopView.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "SSHomeTopView.h" 10 | 11 | @implementation SSHomeTopView 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 | -------------------------------------------------------------------------------- /JRTTDemo/Class/TouTiao/WeiTouTiaoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WeiTouTiaoViewController.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WeiTouTiaoViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/Class/TouTiao/WeiTouTiaoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WeiTouTiaoViewController.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "HomeMenuView.h" 10 | #import "WeiTouTiaoViewController.h" 11 | 12 | @interface WeiTouTiaoViewController () 13 | @property (nonatomic,strong) NSMutableArray * titleArray; 14 | 15 | @property (nonatomic,strong) HomeMenuView * menuView; 16 | @end 17 | 18 | @implementation WeiTouTiaoViewController 19 | -(NSMutableArray *)titleArray 20 | { 21 | if (!_titleArray) { 22 | _titleArray = [NSMutableArray new]; 23 | } 24 | return _titleArray; 25 | } 26 | - (void)viewDidLoad { 27 | [super viewDidLoad]; 28 | // Do any additional setup after loading the view. 29 | HomeMenuView * view = [HomeMenuView getViewWithNibSelectedBlock:^(NSIndexPath *idxPath, NSMutableArray *dataArray) { 30 | 31 | } cellIdentifer:@"HomeMenuCollectionViewCell"]; 32 | view.backgroundColor = [UIColor redColor]; 33 | [self.view addSubview:view]; 34 | 35 | __weak typeof(self) weakSelf = self; 36 | [view mas_makeConstraints:^(MASConstraintMaker *make) { 37 | make.left.equalTo(weakSelf.view); 38 | make.top.equalTo(weakSelf.view).offset(20); 39 | make.right.equalTo(weakSelf.view); 40 | make.height.equalTo(@44); 41 | }]; 42 | 43 | self.menuView =view; 44 | 45 | [PPNetworkHelper GET:@"http://is.snssdk.com/article/category/get_subscribed/v2/?iid=25504462036&device_id=43911586446&ac=wifi&channel=iphone6&aid=13&app_name=news_article&version_code=659&version_name=6.5.9&device_platform=ios&ab_version=275263%2C276222%2C271178%2C208278%2C252767%2C249828%2C246859%2C275644%2C268839%2C276183%2C249686%2C249675%2C264842%2C268794%2C249667%2C274584%2C206075%2C249674%2C272432%2C229304%2C276049%2C270947%2C271842%2C275587%2C275947%2C266386%2C271717%2C260441%2C240865%2C274670%2C270388%2C276002%2C251713%2C271059%2C274344%2C275066%2C229399%2C276128%2C270333%2C275347%2C274131%2C267093%2C274411%2C270107%2C258356%2C247848%2C264452%2C276173%2C249045%2C271663%2C244746%2C273961%2C274292%2C264616%2C275350%2C276211%2C268788%2C260656%2C261944%2C241181%2C268341%2C232362%2C265709%2C271194%2C273233%2C239096%2C272011%2C170988%2C269425%2C273499%2C268663%2C275295%2C243585%2C276203%2C272515%2C272486%2C257280%2C261294%2C265122%2C258603&ab_client=a1%2Cc4%2Ce1%2Cf2%2Cg2%2Cf7&ab_feature=94563%2C102749&abflag=3&ssmix=a&device_type=BAC-AL00&device_brand=HUAWEI&language=zh&os_api=24&os_version=7.0&uuid=866432038206049&openudid=50468f33e8fc72cf&manifest_version_code=659&resolution=720*1208&dpi=320&update_version_code=65902&_rticket=1517897403139&plugin=10575&fp=42TqLlm1Pr5_FlHtLrU1FlFSF2Qq&pos=5r_-9Onkv6e_dBoQeCcbeCUfv7G_8fLz-vTp6Pn4v6esrauzqKuur6-rsb_x_On06ej5-L-nr6SzqK6pqa-v4A%3D%3D&rom_version=emotionui_5.1_bac-al00c00b180&ts=1517897403&as=a28564971bcb0a96294897&mas=00d821575ea3fde5405dd395344d4d8767ad8250edd6552d73" parameters:@{} success:^(id responseObject) { 46 | 47 | TitleModel * model = [TitleModel yy_modelWithDictionary:responseObject]; 48 | T1Data * obj = [T1Data new]; 49 | obj.category = @""; 50 | obj.name = @"推荐"; 51 | obj.web_url = @""; 52 | obj.flags = 0; 53 | obj.tip_new = 0; 54 | obj.default_add = 1; 55 | obj.concern_id = @""; 56 | obj.type = 4; 57 | obj.icon_url = @""; 58 | NSMutableArray * tempArr = [model.data.data mutableCopy]; 59 | [tempArr insertObject:obj atIndex:0]; 60 | [self.titleArray setArray:tempArr]; 61 | 62 | 63 | dispatch_async(dispatch_get_main_queue(), ^{ 64 | // 通知主线程刷新 神马的 65 | [self updateVC]; 66 | }); 67 | 68 | 69 | 70 | 71 | 72 | } failure:^(NSError *error) { 73 | 74 | }]; 75 | 76 | 77 | 78 | } 79 | -(void)updateVC 80 | { 81 | [self.menuView.viewModel updateData:self.titleArray]; 82 | 83 | } 84 | - (void)didReceiveMemoryWarning { 85 | [super didReceiveMemoryWarning]; 86 | // Dispose of any resources that can be recreated. 87 | } 88 | 89 | /* 90 | #pragma mark - Navigation 91 | 92 | // In a storyboard-based application, you will often want to do a little preparation before navigation 93 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 94 | // Get the new view controller using [segue destinationViewController]. 95 | // Pass the selected object to the new view controller. 96 | } 97 | */ 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /JRTTDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | 今日头条 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | UILaunchStoryboardName 31 | LaunchScreen 32 | UIMainStoryboardFile 33 | Main 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UISupportedInterfaceOrientations~ipad 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationPortraitUpsideDown 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /JRTTDemo/Marc/MarcHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MarcHeader.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #define RGB(r,g,b) [UIColor colorWithWholeRed:r green:g blue:b] 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /JRTTDemo/NetWork/HttpHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // HttpHelper.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/5. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HttpHelper : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/NetWork/HttpHelper.m: -------------------------------------------------------------------------------- 1 | // 2 | // HttpHelper.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/5. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "HttpHelper.h" 10 | 11 | @implementation HttpHelper 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/PrefixHeader.pch: -------------------------------------------------------------------------------- 1 | // 2 | // PrefixHeader.pch 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #ifndef PrefixHeader_pch 10 | #define PrefixHeader_pch 11 | 12 | #import "MarcHeader.h" 13 | 14 | #import 15 | 16 | #import 17 | 18 | #import 19 | #import 20 | #import 21 | #import 22 | #import 23 | #import 24 | 25 | #import "UIViewController+addA.h" 26 | #endif /* PrefixHeader_pch */ 27 | -------------------------------------------------------------------------------- /JRTTDemo/Tool/JRTTabBarItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // JRTTabBarItem.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/29. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JRTTabBarItem : UITabBarItem 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/Tool/JRTTabBarItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // JRTTabBarItem.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/29. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "JRTTabBarItem.h" 10 | 11 | @implementation JRTTabBarItem 12 | 13 | - (instancetype)initWithCoder:(NSCoder *)coder 14 | { 15 | self = [super initWithCoder:coder]; 16 | if (self) { 17 | [self loadUI]; 18 | } 19 | return self; 20 | } 21 | 22 | -(void)loadUI 23 | { 24 | UIImage * img = self.image; 25 | self.image = [img imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; 26 | UIImage * selectedImg =self.selectedImage; 27 | self.selectedImage = [selectedImg imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; 28 | [self setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithHexString:@"#686868"]} forState:UIControlStateNormal]; 29 | [self setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithHexString:@"#f85959"]} forState:UIControlStateSelected]; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /JRTTDemo/Tool/NSString+Date.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Date.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/30. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (Date) 12 | +(NSString*)getTimeToData:(NSString*)timeInterval; 13 | @end 14 | -------------------------------------------------------------------------------- /JRTTDemo/Tool/NSString+Date.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Date.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/30. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NSString+Date.h" 11 | 12 | @implementation NSString (Date) 13 | +(NSString*)getTimeToData:(NSString*)timeInterval{ 14 | double huodoS =[timeInterval doubleValue]; 15 | NSDate*detaildate=[NSDate dateWithTimeIntervalSince1970:huodoS]; 16 | // 获取当前时间戳 17 | NSDate* dat = [NSDate dateWithTimeIntervalSinceNow:0]; 18 | NSTimeInterval currentS=[dat timeIntervalSince1970]; 19 | 20 | 21 | 22 | NSDateFormatter*dateFormatter = [[NSDateFormatter alloc]init]; 23 | 24 | //设定时间格式,这里可以设置成自己需要的格式 25 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; 26 | NSString*currentDateStr = [dateFormatter stringFromDate:detaildate]; 27 | 28 | 29 | if (currentS0) { 41 | // 还有好几天 42 | return [detaildate stringWithFormat:[NSDate ymdHmsFormat]]; 43 | }else if(flag==0){ 44 | // 今天 45 | return [detaildate stringWithFormat:[NSDate hmsFormat]]; 46 | }else{ 47 | // 不是今天已过期 48 | return nil; 49 | } 50 | 51 | return currentDateStr; 52 | 53 | 54 | } 55 | @end 56 | -------------------------------------------------------------------------------- /JRTTDemo/Tool/UIViewController+addA.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+addA.h 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import "TitleModel.h" 10 | #import 11 | 12 | @interface UIViewController (addA) 13 | @property (nonatomic,strong) T1Data * tModel111; 14 | -(void)setTModel:(T1Data *)tModel; 15 | -(T1Data *)tModel; 16 | @end 17 | -------------------------------------------------------------------------------- /JRTTDemo/Tool/UIViewController+addA.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+addA.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/2/6. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | #import 9 | #import "UIViewController+addA.h" 10 | 11 | @implementation UIViewController (addA) 12 | static char tModelKey = 'tModel'; 13 | -(void)setTModel:(T1Data *)tModel 14 | { 15 | objc_setAssociatedObject(self, tModelKey, tModel, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 16 | } 17 | 18 | -(T1Data *)tModel 19 | { 20 | return objc_getAssociatedObject(self, tModelKey); 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /JRTTDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // JRTTDemo 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /JRTTDemoTests/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 | -------------------------------------------------------------------------------- /JRTTDemoTests/JRTTDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // JRTTDemoTests.m 3 | // JRTTDemoTests 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JRTTDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation JRTTDemoTests 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 | -------------------------------------------------------------------------------- /JRTTDemoUITests/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 | -------------------------------------------------------------------------------- /JRTTDemoUITests/JRTTDemoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // JRTTDemoUITests.m 3 | // JRTTDemoUITests 4 | // 5 | // Created by 赵 on 2018/1/26. 6 | // Copyright © 2018年 袁书辉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JRTTDemoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation JRTTDemoUITests 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 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform:ios,8.0 2 | 3 | target 'JRTTDemo' do 4 | pod 'CommonElement', '0.2.2' 5 | pod 'Masonry', '~> 1.1.0' 6 | pod 'AFNetworking', '~> 3.1.0' 7 | pod 'PPNetworkHelper', '~> 0.8.0' 8 | pod 'YYModel', '~> 1.0.4' 9 | pod 'SDWebImage', '~> 4.2.3' 10 | 11 | pod 'MJRefresh', '~> 3.1.15.3' 12 | 13 | pod 'ZFPlayer' 14 | end 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 仿写今日头条 2 | ![](JRTT.gif) 3 | 4 | ##增加视频播放功能 5 | ##首页列表 6 | 7 | 会持续更新 8 | 9 | 10 | 项目下载后,一定要重新pod install --------------------------------------------------------------------------------