-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { UILabel *customLabel = [[UILabel alloc] init]; customLabel.text = [self tableView:tableView titleForHeaderInSection:section]; return customLabel; }…
UITableView中的headerView 默认颜色是灰色的 如果自定义headerView必须在headerview上加一个view作为添加的颜色 或者直接 -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 写view 改变view的颜色…
Latex中如何设置字体颜色(三种方式)   1.直接使用定义好的颜色 \usepackage{color} \textcolor{red/blue/green/black/white/cyan/magenta/yellow}{text} 其中textcolor{...}中包含的是系统定义好的颜色 2.组合red.green和blue的值合成我们想要的颜色 \usepackage{color} \textcolor[rgb]{r,g,b}{text} 其中{r,g,b}代表red.green和b…
应用中登陆界面颜色较浅,状态栏字体颜色为黑色,跳转到主界面之后,界面颜色较深,状态栏颜色随之变成白色.但是再重新返回登陆界面后,状态栏字体颜色并没有改成黑色,特别别扭. plist文件里将View controller-based status bar appearance改为NO然后在view controller里边加上下边一句就可以了,这样状态栏是黑字 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyle…
Step1. info.plist中设置UIViewControllerBasedStatusBarAppearance为NO Step2. AppDelegate.m中添加 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // 设置状态栏的字体颜色为白色 [application setStatusBarStyle:UIS…
  UITableView中的cell可以有很多,一般会通过重用cell来达到节省内存的目的:通过为每个cell指定一个重用标识符(reuseIdentifier),即指定了单元格的种类,当cell滚出屏幕时,会将滚出屏幕的单元格放入重用的缓存池中,当某个未在屏幕上的单元格要显示的时候,就从这个缓存池中取出单元格进行重用. 但对于多变的自定义cell,有时这种重用机制会出错.比如,当一个cell含有一个UITextField的子类并被放在重用queue中以待重用,这时如果一个未包含任何子视图的c…
-(CGFloat)tableView:(UITableView*)tableView heightForHeaderInSection:(NSInteger)section { return 1.0; } -(CGFloat)tableView:(UITableView*)tableView heightForFooterInSection:(NSInteger)section { return 1.0; } -(UIView*)tableView:(UITableView*)tableVie…
storyboard 中这样设置 具体步骤: 1.在User Defined Runtime Attributes中添加一个Key. 2.输入Key Path(这里我们输入_placeholderLabel.textColor). 3.选择Type,有很多种(这里我们选择Color)   4.设置Value(这里出现的是颜色的选择面板,选择想要的颜色即可).     纯代码的话这样子就 OK 啦 //textField的placeholder的背景色更改第一种颜色     _userNameTx…
tableView的常规配置,当超出一屏的cell就会标上可重用的标识出列到可重用缓存池中,后面再根据可重用标识来到的可重的cell就会和前面显示同样内容. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ // 定义唯一标识 static NSString *CellIdentifier = @"Cell"; // 通过唯一标识…
1.在/etc/vimrc新增以下一行 syntax on 注:上述方法对root用户无效,原因为在一般用户中,alias vi=vim,而在root用户中默认无此设置,因此若需要root用户也显示颜色,可以(1)用vim命令编辑文件(2)在~/.bashrc中添加alias vi=vim. 2.设置secureCRT属性.…