<UITableViewDelegate,UITableViewDataSource>
{
//定义一个数据视图对象
//数据视图用来显示大量相同格式的信息的视图
//例如:电话通讯录,qq好友,朋友圈信息
UITableView* _tableView;
NSMutableArray* _arrayData;
}
#import "ViewControllerMy.h"
#import "ViewController.h"
#import "yunViewController.h"
@interface ViewControllerMy()
@end
@implementation ViewControllerMy
- (void)viewDidLoad {
// Do any additional setup after loading the view.
[super viewDidLoad];
UIBarButtonItem *p1 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"yun.png"] style:UIBarButtonItemStylePlain target:self action:@selector(pressDown)];
self.navigationItem.leftBarButtonItem = p1;
// Do any additional setup after loading the view.
UIImage* imageAccount = [UIImage imageNamed:@"账号.png"];
UITabBarItem* tabBarItem = [[UITabBarItem alloc]initWithTitle:@"账号" image:imageAccount tag:101];
self.tabBarItem = tabBarItem;
//p1:位置 p2:风格
_tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 40, 375, 586) style:UITableViewStyleGrouped];
//设置数据视图的代理对象
_tableView.delegate = self;
//设置数据视图的数据源对象
_tableView.dataSource = self;
[self.view addSubview:_tableView];
_arrayData = [[NSMutableArray alloc]init];
NSArray* array01 = [NSArray arrayWithObjects:@"", nil];
NSArray* array02 = [NSArray arrayWithObjects:@"我的音乐",@"", nil];
NSArray* array03 = [NSArray arrayWithObjects:@"最近播放",@"", nil];
NSArray* array04 = [NSArray arrayWithObjects:@"创建歌单⁴ 收藏歌单⁹ 歌单助手",@"", nil];
[_arrayData addObject:array01];
[_arrayData addObject:array02];
[_arrayData addObject:array03];
[_arrayData addObject:array04];
UIButton* btnMy = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnMy setImage:[[UIImage imageNamed:@"xiazai.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
btnMy.titleLabel.text = @"本地音乐";
btnMy.titleLabel.font = [UIFont systemFontOfSize:10];
btnMy.frame = CGRectMake(45, 145, 32, 32);
[_tableView addSubview:btnMy];
UILabel* label01 = [[UILabel alloc]init];
label01.text = @"本地音乐";
label01.frame = CGRectMake(35, 165, 80, 40);
[_tableView addSubview:label01];
label01.font = [UIFont systemFontOfSize:12];
UIButton* btndt = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btndt setImage:[[UIImage imageNamed:@"电台.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
btndt.titleLabel.text = @"我的电台";
btndt.titleLabel.font = [UIFont systemFontOfSize:10];
btndt.frame = CGRectMake(130,145 , 32, 32);
[_tableView addSubview:btndt];
UILabel* label02 = [[UILabel alloc]init];
label02.text = @"我的电台";
label02.frame = CGRectMake(120, 165, 80, 40);
[_tableView addSubview:label02];
label02.font = [UIFont systemFontOfSize:12];
UIButton* btnsc = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnsc setImage:[[UIImage imageNamed:@"收藏.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
btnsc.titleLabel.text = @"我的收藏";
btnsc.titleLabel.font = [UIFont systemFontOfSize:10];
btnsc.frame = CGRectMake(215,145 , 30, 30);
[_tableView addSubview:btnsc];
UILabel* label03 = [[UILabel alloc]init];
label03.text = @"我的收藏";
label03.frame = CGRectMake(205, 165, 80, 40);
[_tableView addSubview:label03];
label03.font = [UIFont systemFontOfSize:12];
UIButton* btnnew = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnnew setImage:[[UIImage imageNamed:@"新歌.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
btnnew.titleLabel.text = @"关注新歌";
btnnew.titleLabel.font = [UIFont systemFontOfSize:10];
btnnew.frame = CGRectMake(295,145, 30, 30);
[_tableView addSubview:btnnew];
UILabel* label04 = [[UILabel alloc]init];
label04.text = @"关注新歌";
label04.frame = CGRectMake(285, 165, 80, 40);
[_tableView addSubview:label04];
label04.font = [UIFont systemFontOfSize:12];
UIButton* btntouxiang = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btntouxiang setImage:[[UIImage imageNamed:@"001.jpg"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
btntouxiang.titleLabel.text = @"头像";
btntouxiang.titleLabel.font = [UIFont systemFontOfSize:10];
btntouxiang.frame = CGRectMake(10,20,90,90);
[_tableView addSubview:btntouxiang];
UILabel* label05 = [[UILabel alloc]init];
label05.text = @"复杂化";
label05.frame = CGRectMake(120, 40, 80, 40);
[_tableView addSubview:label05];
label05.font = [UIFont systemFontOfSize:18];
_tableView.tableHeaderView = nil;
_tableView.tableFooterView = nil;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
UILabel* label06 = [[UILabel alloc]init];
label06.text = @"LV.7";
label06.frame = CGRectMake(122, 60, 80, 40);
[_tableView addSubview:label06];
label06.font = [UIFont systemFontOfSize:10];
_tableView.tableHeaderView = nil;
_tableView.tableFooterView = nil;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
//获取每组元素的个数(行数)
//必须要实现的协议函数
//程序在显示数据视图是会调用此函数
//返回值:表示每组元素的个数
//p1: 数据视图对象本身
//p2:那一组需要的行数
-(void)pressDown{
yunViewController* yun1 = [[yunViewController alloc]init];
[self.navigationController pushViewController:yun1 animated:YES ];
// NSLog(@"111");
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
NSInteger numRow = [[_arrayData objectAtIndex:section]count];
return numRow;
}
//设置数据视图的组数
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
// return 5;
return _arrayData.count;
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
// NSString* cellStr = @"cell";
//
// UITableViewCell* cell01 = [_tableView dequeueReusableCellWithIdentifier:cellStr];
UITableViewCell* cell = [_tableView dequeueReusableCellWithIdentifier:@"cell"];
if(cell == nil){
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
}
cell.textLabel.textColor = [UIColor blackColor];
cell.textLabel.text = _arrayData[indexPath.section][indexPath.row];
cell.accessoryType = UITableViewCellAccessoryNone;
if(indexPath.section == 1 ){
if(indexPath.row == 0){
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}else{
UIButton* btnMy1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnMy1 setImage:[[UIImage imageNamed:@"my1.jpg"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
btnMy1.titleLabel.font = [UIFont systemFontOfSize:10];
btnMy1.frame = CGRectMake(0, 250, 400, 180);
[_tableView addSubview:btnMy1];
}
}
if (indexPath.section == 2){
if(indexPath.row == 0){
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}else{
UIButton* btnMy2 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnMy2 setImage:[[UIImage imageNamed:@"my2.jpg"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
btnMy2.titleLabel.font = [UIFont systemFontOfSize:10];
btnMy2.frame = CGRectMake(0, 500, 400, 100);
[_tableView addSubview:btnMy2];
}
}
if (indexPath.section == 3){
if(indexPath.row == 0){
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}else{
UIButton* btnMy3 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnMy3 setImage:[[UIImage imageNamed:@"my3.jpg"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
btnMy3.titleLabel.font = [UIFont systemFontOfSize:10];
btnMy3.frame = CGRectMake(0, 650, 400, 180);
[_tableView addSubview:btnMy3];
}
}
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 0;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 0;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section == 0 ){
return 200;
}
if((indexPath.section == 1) && (indexPath.row == 1))
return 200;
if((indexPath.section == 2) && (indexPath.row == 1))
return 110;
if((indexPath.section == 3) && (indexPath.row == 1))
return 220;
return 45;
}
-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
return [[UIView alloc]init];
}
-(UIView*)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
return [[UIView alloc]init];
}
//- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
//{
// switch (section) {
// case 1:
// return @"音乐服务";
// break;
// case 2:
// return @"小工具";
// break;
// default:
// return @"";
// break;
// }
//}
// -(NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
// return @"音乐服务";
// }
@end
@interface ViewControllerAccount : UIViewController
< UITableViewDelegate, UITableViewDataSource>
{
UITableView* _tableView;
NSMutableArray* _arrayData;
UISwitch* _Switch;
}
@end
#import "ViewControllerAccount.h"
#import "ViewController.h"
@interface ViewControllerAccount ( )
@end
@implementation ViewControllerAccount
- ( void ) viewDidLoad {
[ super viewDidLoad] ;
UIImage* imageAccount = [ UIImage imageNamed: @"账号.png" ] ;
UITabBarItem* tabBarItem = [ [ UITabBarItem alloc] initWithTitle: @"账号" image: imageAccount tag: 101 ] ;
self. tabBarItem = tabBarItem;
_tableView = [ [ UITableView alloc] initWithFrame: CGRectMake ( 0 , 40 , 375 , 586 ) style: UITableViewStyleGrouped] ;
_Switch = [ [ UISwitch alloc] init] ;
_Switch. on = NO ;
_tableView. delegate = self;
_tableView. dataSource = self;
[ self. view addSubview: _tableView] ;
_arrayData = [ [ NSMutableArray alloc] init] ;
NSArray* array01 = [ NSArray arrayWithObjects: @"" , nil] ;
NSArray* array02 = [ NSArray arrayWithObjects: @"创作者中心" , nil] ;
NSArray* array03 = [ NSArray arrayWithObjects: @"音乐服务" , @"演出" , @"商城" , @"口袋铃声" , @"在线听歌免流量" , nil] ;
NSArray* array04 = [ NSArray arrayWithObjects: @"小工具" , @"设置" , @"夜间模式" , @"定时关闭" , @"音乐黑名单" , @"鲸云音效" , @"添加Siri捷径" , @"音乐闹钟" , @"青少年模式" , nil] ;
NSArray* array05 = [ NSArray arrayWithObjects: @"我的订单" , @"优惠卷" , @"分享网易云音乐" , @"关于" , nil] ;
NSArray* array06 = [ NSArray arrayWithObjects: @" 退出登陆" , nil] ;
[ _arrayData addObject: array01] ;
[ _arrayData addObject: array02] ;
[ _arrayData addObject: array03] ;
[ _arrayData addObject: array04] ;
[ _arrayData addObject: array05] ;
[ _arrayData addObject: array06] ;
UIButton* btnFriend = [ UIButton buttonWithType: UIButtonTypeRoundedRect] ;
[ btnFriend setImage: [ [ UIImage imageNamed: @"haoyou.png" ] imageWithRenderingMode: UIImageRenderingModeAlwaysOriginal] forState: UIControlStateNormal] ;
btnFriend. titleLabel. text = @"我的好友" ;
btnFriend. titleLabel. font = [ UIFont systemFontOfSize: 10 ] ;
btnFriend. frame = CGRectMake ( 130 , 145 , 30 , 30 ) ;
[ _tableView addSubview: btnFriend] ;
UILabel* label01 = [ [ UILabel alloc] init] ;
label01. text = @"我的好友" ;
label01. frame = CGRectMake ( 125 , 165 , 80 , 40 ) ;
[ _tableView addSubview: label01] ;
label01. font = [ UIFont systemFontOfSize: 10 ] ;
UIButton* btnNews = [ UIButton buttonWithType: UIButtonTypeRoundedRect] ;
[ btnNews setImage: [ [ UIImage imageNamed: @"xiaoxi.png" ] imageWithRenderingMode: UIImageRenderingModeAlwaysOriginal] forState: UIControlStateNormal] ;
btnNews. titleLabel. text = @"我的消息" ;
btnNews. titleLabel. font = [ UIFont systemFontOfSize: 10 ] ;
btnNews. frame = CGRectMake ( 40 , 145 , 30 , 30 ) ;
[ _tableView addSubview: btnNews] ;
UILabel* label02 = [ [ UILabel alloc] init] ;
label02. text = @"我的消息" ;
label02. frame = CGRectMake ( 35 , 165 , 80 , 40 ) ;
[ _tableView addSubview: label02] ;
label02. font = [ UIFont systemFontOfSize: 10 ] ;
UIButton* btnSelf = [ UIButton buttonWithType: UIButtonTypeRoundedRect] ;
[ btnSelf setImage: [ [ UIImage imageNamed: @"fangzi2.png" ] imageWithRenderingMode: UIImageRenderingModeAlwaysOriginal] forState: UIControlStateNormal] ;
btnSelf. titleLabel. text = @"个性主页" ;
btnSelf. titleLabel. font = [ UIFont systemFontOfSize: 10 ] ;
btnSelf. frame = CGRectMake ( 215 , 145 , 30 , 30 ) ;
[ _tableView addSubview: btnSelf] ;
UILabel* label03 = [ [ UILabel alloc] init] ;
label03. text = @"个性主页" ;
label03. frame = CGRectMake ( 210 , 165 , 80 , 40 ) ;
[ _tableView addSubview: label03] ;
label03. font = [ UIFont systemFontOfSize: 10 ] ;
UIButton* btnClo = [ UIButton buttonWithType: UIButtonTypeRoundedRect] ;
[ btnClo setImage: [ [ UIImage imageNamed: @"yifu-2.png" ] imageWithRenderingMode: UIImageRenderingModeAlwaysOriginal] forState: UIControlStateNormal] ;
btnClo. titleLabel. text = @"个性装扮" ;
btnClo. titleLabel. font = [ UIFont systemFontOfSize: 10 ] ;
btnClo. frame = CGRectMake ( 295 , 145 , 35 , 35 ) ;
[ _tableView addSubview: btnClo] ;
UILabel* label04 = [ [ UILabel alloc] init] ;
label04. text = @"个性装扮" ;
label04. frame = CGRectMake ( 290 , 165 , 80 , 40 ) ;
[ _tableView addSubview: label04] ;
label04. font = [ UIFont systemFontOfSize: 10 ] ;
UIButton* btntouxiang = [ UIButton buttonWithType: UIButtonTypeRoundedRect] ;
[ btntouxiang setImage: [ [ UIImage imageNamed: @"001.jpg" ] imageWithRenderingMode: UIImageRenderingModeAlwaysOriginal] forState: UIControlStateNormal] ;
btntouxiang. titleLabel. text = @"头像" ;
btntouxiang. titleLabel. font = [ UIFont systemFontOfSize: 10 ] ;
btntouxiang. frame = CGRectMake ( 10 , 20 , 90 , 90 ) ;
[ _tableView addSubview: btntouxiang] ;
UILabel* label05 = [ [ UILabel alloc] init] ;
label05. text = @"复杂化" ;
label05. frame = CGRectMake ( 120 , 40 , 80 , 40 ) ;
[ _tableView addSubview: label05] ;
label05. font = [ UIFont systemFontOfSize: 18 ] ;
_tableView. tableHeaderView = nil;
_tableView. tableFooterView = nil;
_tableView. separatorStyle = UITableViewCellSeparatorStyleNone;
}
- ( NSInteger) tableView: ( UITableView * ) tableView numberOfRowsInSection: ( NSInteger) section{
NSInteger numRow = [ [ _arrayData objectAtIndex: section] count] ;
return numRow;
}
- ( NSInteger) numberOfSectionsInTableView: ( UITableView * ) tableView{
return _arrayData. count;
}
- ( UITableViewCell* ) tableView: ( UITableView * ) tableView cellForRowAtIndexPath: ( NSIndexPath * ) indexPath{
UITableViewCell* cell = [ _tableView dequeueReusableCellWithIdentifier: @"cell" ] ;
if ( cell == nil) {
cell = [ [ UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: @"cell" ] ;
}
cell. textLabel. textColor = [ UIColor blackColor] ;
cell. textLabel. text = _arrayData[ indexPath. section] [ indexPath. row] ;
cell. accessoryType = UITableViewCellAccessoryNone;
UIImage* image1 = [ UIImage imageNamed: @"" ] ;
cell. imageView. image = image1;
if ( indexPath. section == 1 ) {
UIImage* image = [ UIImage imageNamed: @"1.png" ] ;
cell. imageView. image = image;
cell. accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
if ( ( indexPath. section == 2 ) && ( indexPath. row != 0 ) ) {
NSString* str = [ NSString stringWithFormat: @"%ld.png" , indexPath. row % 5 + 1 ] ;
UIImage* image2 = [ UIImage imageNamed: str] ;
cell. imageView. image = image2;
cell. accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
if ( ( indexPath. section == 3 ) && ( indexPath. row != 0 ) ) {
NSString* str1 = [ NSString stringWithFormat: @"%ld.png" , indexPath. row % 8 + 5 ] ;
UIImage* image3 = [ UIImage imageNamed: str1] ;
cell. imageView. image = image3;
cell. accessoryType = UITableViewCellAccessoryDisclosureIndicator;
if ( indexPath. row == 2 ) {
_Switch. frame = CGRectMake ( 290 , 10 , 80 , 40 ) ;
[ cell. contentView addSubview: _Switch] ;
}
}
if ( indexPath. section == 4 ) {
NSString* str2 = [ NSString stringWithFormat: @"%ld.png" , indexPath. row % 13 + 14 ] ;
UIImage* image4 = [ UIImage imageNamed: str2] ;
cell. imageView. image = image4;
cell. accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
if ( indexPath. section == 5 ) {
cell. textLabel. textColor = [ UIColor redColor] ;
}
return cell;
}
- ( CGFloat) tableView: ( UITableView * ) tableView heightForHeaderInSection: ( NSInteger) section{
return 0 ;
}
- ( CGFloat) tableView: ( UITableView * ) tableView heightForFooterInSection: ( NSInteger) section{
return 0 ;
}
- ( CGFloat) tableView: ( UITableView * ) tableView heightForRowAtIndexPath: ( NSIndexPath * ) indexPath{
if ( indexPath. section == 0 ) {
return 200 ;
}
return 45 ;
}
- ( UIView* ) tableView: ( UITableView * ) tableView viewForHeaderInSection: ( NSInteger) section{
return [ [ UIView alloc] init] ;
}
- ( UIView* ) tableView: ( UITableView * ) tableView viewForFooterInSection: ( NSInteger) section
{
return [ [ UIView alloc] init] ;
}
#import < UIKit/ UIKit. h>
@interface SceneDelegate : UIResponder < UIWindowSceneDelegate>
@property ( strong, nonatomic) UIWindow * window;
@end
#import "SceneDelegate.h"
#import "ViewControllerMy.h"
#import "ViewControllerWow.h"
#import "ViewControllerAccount.h"
#import "ViewControllerVideo.h"
#import "ViewControllerVillage.h"
#import "yunViewController.h"
@interface SceneDelegate ( )
@end
@implementation SceneDelegate
- ( void ) scene: ( UIScene * ) scene willConnectToSession: ( UISceneSession * ) session options: ( UISceneConnectionOptions * ) connectionOptions {
ViewControllerMy* VCMy = [ [ ViewControllerMy alloc] init] ;
ViewControllerWow* VCWow = [ [ ViewControllerWow alloc] init] ;
ViewControllerVideo* VCVideo = [ [ ViewControllerVideo alloc] init] ;
ViewControllerAccount* VCAccount = [ [ ViewControllerAccount alloc] init] ;
ViewControllerVillage* VCVillage = [ [ ViewControllerVillage alloc] init] ;
VCMy. title = @"我的" ;
VCVillage. title = @"云村" ;
VCVideo. title = @"视频" ;
VCAccount. title = @"账号" ;
VCWow. title = @"发现" ;
VCMy. view. backgroundColor = [ UIColor whiteColor] ;
VCAccount. view. backgroundColor = [ UIColor whiteColor] ;
VCVideo. view. backgroundColor = [ UIColor whiteColor] ;
VCVillage. view. backgroundColor = [ UIColor whiteColor] ;
VCWow. view. backgroundColor = [ UIColor whiteColor] ;
UIBarButtonItem * p2 = [ [ UIBarButtonItem alloc] initWithImage: [ UIImage imageNamed: @"列表.png" ] style: UIBarButtonItemStylePlain target: self action: nil] ;
UIBarButtonItem * p3 = [ [ UIBarButtonItem alloc] initWithImage: [ UIImage imageNamed: @"saoyisao-2.png" ] style: UIBarButtonItemStylePlain target: self action: nil] ;
VCAccount. navigationItem. leftBarButtonItem = p3;
VCVillage. navigationItem. rightBarButtonItem = p2;
VCAccount. navigationItem. rightBarButtonItem = p2;
VCVideo. navigationItem. rightBarButtonItem = p2;
VCWow. navigationItem. rightBarButtonItem = p2;
VCMy. navigationItem. rightBarButtonItem = p2;
VCMy. navigationItem. leftBarButtonItem. tintColor = [ UIColor redColor] ;
VCAccount. navigationItem. leftBarButtonItem. tintColor = [ UIColor grayColor] ;
UINavigationController * a1 = [ [ UINavigationController alloc] initWithRootViewController: VCWow] ;
UINavigationController * a2 = [ [ UINavigationController alloc] initWithRootViewController: VCVideo] ;
UINavigationController * a3 = [ [ UINavigationController alloc] initWithRootViewController: VCMy] ;
UINavigationController * a4 = [ [ UINavigationController alloc] initWithRootViewController: VCVillage] ;
UINavigationController * a5 = [ [ UINavigationController alloc] initWithRootViewController: VCAccount] ;
NSArray* arrayVC = [ NSArray arrayWithObjects: a1, a2, a3, a4, a5, nil] ;
UITabBarController* tbController = [ [ UITabBarController alloc] init] ;
tbController. viewControllers = arrayVC;
tbController. selectedIndex = 2 ;
self. window. rootViewController = tbController;
[ self. window makeKeyAndVisible] ;
}
- ( void ) sceneDidDisconnect: ( UIScene * ) scene {
}
- ( void ) sceneDidBecomeActive: ( UIScene * ) scene {
}
- ( void ) sceneWillResignActive: ( UIScene * ) scene {
}
- ( void ) sceneWillEnterForeground: ( UIScene * ) scene {
}
- ( void ) sceneDidEnterBackground: ( UIScene * ) scene {
}
@end
#import "yunViewController.h"
@interface yunViewController ( )
@end
@implementation yunViewController
- ( void ) viewDidLoad {
[ super viewDidLoad] ;
self. view. backgroundColor = [ UIColor colorWithPatternImage: [ UIImage imageNamed: @"btn02.jpg" ] ] ;
self. title = @"网易云盘" ;
UIBarButtonItem * leftBtn = [ [ UIBarButtonItem alloc] initWithImage: [ UIImage imageNamed: @"fanhui.png" ] style: UIBarButtonItemStylePlain target: self action: @selector ( pressBack) ] ;
leftBtn. tintColor = [ UIColor redColor] ;
self. navigationItem. leftBarButtonItem = leftBtn;
}
- ( void ) pressBack{
[ self. navigationController popViewControllerAnimated: YES ] ;
}