Commit acfb26f296302af7703d8307859afb03ae69e6b1
1 parent
c647b2e9
no message
Showing
1 changed file
with
13 additions
and
2 deletions
CNLiveScioLive/Pages/Live/Controller/GraphicLiveViewController.m
| @@ -173,16 +173,27 @@ | @@ -173,16 +173,27 @@ | ||
| 173 | - (void)loadMovieView { | 173 | - (void)loadMovieView { |
| 174 | [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"GraphicLive_DidLockScreen"]; | 174 | [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"GraphicLive_DidLockScreen"]; |
| 175 | imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, iPhoneX ? 44 : 0, MainScreenWidth, videoHeight)]; | 175 | imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, iPhoneX ? 44 : 0, MainScreenWidth, videoHeight)]; |
| 176 | -// imageView.image = [UIImage imageNamed:@"cnlive_placeholder"]; | ||
| 177 | [imageView sd_setImageWithURL:[NSURL URLWithString:_dictionary[@"poster"]] placeholderImage:[UIImage imageNamed:@"cnlive_placeholder"]]; | 176 | [imageView sd_setImageWithURL:[NSURL URLWithString:_dictionary[@"poster"]] placeholderImage:[UIImage imageNamed:@"cnlive_placeholder"]]; |
| 178 | [self.view addSubview:imageView]; | 177 | [self.view addSubview:imageView]; |
| 179 | 178 | ||
| 180 | UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; | 179 | UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 181 | [backButton addTarget:self action:@selector(Pop:) forControlEvents:UIControlEventTouchUpInside]; | 180 | [backButton addTarget:self action:@selector(Pop:) forControlEvents:UIControlEventTouchUpInside]; |
| 182 | [backButton setImage:[UIImage imageNamed:@"cnlive_white_back"] forState:UIControlStateNormal]; | 181 | [backButton setImage:[UIImage imageNamed:@"cnlive_white_back"] forState:UIControlStateNormal]; |
| 183 | - [backButton setFrame:CGRectMake(0, 20, 44, 44)]; | 182 | + [backButton setFrame:CGRectMake(0, StatusBarHeight, 44, 44)]; |
| 184 | [self.view addSubview:backButton]; | 183 | [self.view addSubview:backButton]; |
| 184 | + | ||
| 185 | + UIButton *shareButton = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 186 | + [shareButton addTarget:self action:@selector(shareButton:) forControlEvents:UIControlEventTouchUpInside]; | ||
| 187 | + [shareButton setImage:[UIImage imageNamed:@"cnlive_share"] forState:UIControlStateNormal]; | ||
| 188 | + [shareButton setFrame:CGRectMake(MainScreenWidth-44, StatusBarHeight, 44, 44)]; | ||
| 189 | + [self.view addSubview:shareButton]; | ||
| 190 | + | ||
| 191 | +} | ||
| 192 | + | ||
| 193 | +- (void)shareButton:(UIButton *)btn{ | ||
| 194 | + | ||
| 185 | } | 195 | } |
| 196 | + | ||
| 186 | - (void)pausePlayer { | 197 | - (void)pausePlayer { |
| 187 | [self.liveController pause]; | 198 | [self.liveController pause]; |
| 188 | } | 199 | } |