摘要: 与UIViewController有区别,就是UITableViewController自身的带的是tableView。AppDelegate.m#import "AppDelegate.h"#import "RootTableViewController.h"@interface AppDeleg... 阅读全文
posted @ 2015-10-16 19:23 Coder_J 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 移动的步骤:与编辑的第一步一样#pragma mark 响应方法- (void)leftAction:(UIBarButtonItem *)sender{ NSLog(@"添加.."); // 记录添加样式 _editingStyle = UITableViewCellEditingStyleIns... 阅读全文
posted @ 2015-10-16 19:16 Coder_J 阅读(178) 评论(0) 推荐(0) 编辑
摘要: tableview 的编辑可以分为四个步骤:1、让tableView处于可编辑状态2、指定哪些行可以被编辑3、指定编辑样式(delete还是insert)4、完成编辑(1、修改数据源,2、修改UI界面)1、让tableView处于可编辑状态(1)self.rv.tabelView.editing =... 阅读全文
posted @ 2015-10-16 19:05 Coder_J 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 界面间传值,分两种,一种情况是push入栈,从上一级视图到下一级视图,这只需要在下一级视图中,定义一个属性,用来把上一级的视图的值接收,在进入下一集视图之前封装好,然后在就可以在本视图中得到上一级传下来的值。另一种是pop出栈,逆向传值,这样的情况,由于pop出栈的视图数据全部销毁,所以不能通过属性... 阅读全文
posted @ 2015-10-15 19:33 Coder_J 阅读(148) 评论(0) 推荐(0) 编辑
摘要: UITableView是iOS中最重要的视图,没有之一。基本上每个应用程序都会用到UITableView来布局。UITableView继承于UIScrollView,所以可以滚动。可以表现为两种风格:UITableViewStylePlain和UITableViewStyleGrouped。UITa... 阅读全文
posted @ 2015-10-15 19:20 Coder_J 阅读(149) 评论(0) 推荐(0) 编辑
摘要: UINavigationController是iOS中常用的控制器,作用是用来管理多个视图控制器。主要管理有层级的控制器(也就是一层到下一层)。UINavigationController内部管理视图控制器,主要是因为UINavigationController里是栈结构,把视图控制器入栈和出栈的过... 阅读全文
posted @ 2015-10-14 20:12 Coder_J 阅读(239) 评论(0) 推荐(0) 编辑
摘要: #import "RootView.h"@implementation RootView- (instancetype)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { [self p_setup... 阅读全文
posted @ 2015-10-14 19:20 Coder_J 阅读(136) 评论(0) 推荐(0) 编辑
摘要: UIKit提供了一组控件:UISwitch开关、UIButton按钮、UISegmentedControl分段控件、UISlider滑块、UITextField文本字段控件、UIPageControl分页控件。控件是对UIView派生类的实用增强及补充,并可以直接附着于导航栏、表格单元,甚至更大的对... 阅读全文
posted @ 2015-10-13 22:21 Coder_J 阅读(188) 评论(0) 推荐(0) 编辑
摘要: UIImageView相当于一个相框,用来显示图片,里边可以是一张图片,也可以是一组图片。RootView.m- (void)p_setupView{ self.backgroundColor = [UIColor yellowColor]; self.imv = [[UIImageView all... 阅读全文
posted @ 2015-10-13 22:19 Coder_J 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 在ViewController.m中。@interface ViewController ()@property(nonatomic, strong) UIView * MyView;@end@implementation ViewController- (void)viewDidLoad { [s... 阅读全文
posted @ 2015-10-13 22:04 Coder_J 阅读(146) 评论(0) 推荐(0) 编辑