下载此文档

IOS iPhone开发 UI整理总结.doc


文档分类:IT计算机 | 页数:约12页 举报非法文档有奖
1/12
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/12 下载此文档
文档列表 文档介绍
广播
//发送者
//发送值改变的广播(通知)
[[NSNotificationCenter defaultCenter] postNotificationName:@"dataChange" object:nil];
//接受者
//接收广播
[[NSNotificationCenter defaultCenter] addObserver:self selector:***@selector(reloadView) name:@"dataChange" object:nil];
- (void)dealloc{
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"dataChange" object:nil];
[super dealloc];
}
push-pop View
[ pushViewController:sub animated:YES];
[ popViewControllerAnimated:YES];
//显示导航条
[ setNavigationBarHidden:NO animated:YES];
模态化弹出
[ presentModalViewController: Controller animated:YES];
[Controller dismissViewControllerAnimated:pletion:^{

}];
动画
[UIView animateWithDuration: animations:^{
//通过transform让imageView转动一周
= ransformRotate(, );
}];
heightForRowAtIndexPath
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
//根据数据源中的数据,以及cell中各个控件的frame的设定,重新计算行高
ChatModle *modle=[_dataArray objectAtIndex:];
CGSize size=[ sizeWithFont:[UIFont systemFontOfSize:18]constrainedToSize:CGSizeMake(260, 999) lineBreakMode:NSLineBreakByCharWrapping];
return +40;

}
UILabel 字体
加粗;
[UILabel setFont:[UIFont fontWithName:@"Helvetica-Bold" size:20]];
加粗并且倾斜
[UILabel setFont:[UIFont fontWithName:@"Helvetica-BoldOblique" size:20]];
UILabel使用自定义字体
博客分类: Phone / IOS / Objective-C
 
xcode 4
 
下载自定义字体(例如:)后,拖入项目当中。
 
在 Supporting Files 中找到(项目名称)-, 添加 Fonts provided by application 项, 打开对应的数组,可以设置多个字体,。
 
在程序中通过字体family name,找出字体名字。然后使用
 
C代码 
 = [UIFont fontwithname:@"Blazed" size:42];  
  或者
 
C代码 
UIFont *tfont = [UIFont fontWithName:@"Blazed" size:42];  
 = tfont;  
  
例外还有其他设置:
 
C代码 
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(, , 2

IOS iPhone开发 UI整理总结 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数12
  • 收藏数0 收藏
  • 顶次数0
  • 上传人xunlai783
  • 文件大小69 KB
  • 时间2017-12-29