这个新特性,意味着View被Autolayout调整frame后,会自动拉伸和收缩SupView。 具体到Cell,要求cell.contentView的四条边都与内部元素有约束关系。 在TableViewController里 - (void)viewDidLoad { ? ? [super v...
分类:
移动开发 时间:
2014-09-27 17:47:40
阅读次数:
192
提要 今天要学习的是一些Shader 的例子,从简单到难。Let's go.一大波例子来袭还是用上一篇用到的工程。点我下载红色的螃蟹Test1.shaderShader "Custom/Test1" {
SubShader {
Tags { "RenderType" = "Opaque" }
CGPROGRAM
#pragma surface surf...
分类:
其他好文 时间:
2014-09-27 00:43:09
阅读次数:
268
UITableView的强大更多程度上来自于可以任意自定义UITableViewCell单元格。
通常,UITableView中的Cell是 动态的,在使用过程中,会创建一个Cell池,根据每个cell的高度(即tableView:heightForRowAtIndexPath:返回 值),以及屏幕高度计算屏幕中可显示几个cell。而进行自定义TableViewCell无非是采用代码实现或采...
分类:
其他好文 时间:
2014-09-26 22:49:59
阅读次数:
245
【荐】纯CSS实现漂亮圆角阴影边框_潜水射流曝气机 Custom box with no width restrictions. Height restriction is based on the amount of content.textLorem ipsum dolor sit...
分类:
Web程序 时间:
2014-09-26 14:18:58
阅读次数:
257
Step1: menuTableView.separatorStyle = UITableViewCellSeparatorStyleNone;Step2:
分类:
其他好文 时间:
2014-09-26 13:56:48
阅读次数:
145
在ios开中中,由于屏幕尺寸限制,如果需要显示的数据很多,需要用到分页加载。原理:先数据放到一个table中,先显示10条,table底部有一察看更多选项,点击察看更多查看解析的剩余数据。基本上就是数据源里先只放10条, 点击最后一个cell时, 添加更多的数据到数据源中. 比如:数据源是个arra...
分类:
其他好文 时间:
2014-09-26 13:16:18
阅读次数:
210
1、如果需要将label靠左边对齐,则必须重写底层源码新增mxText的一个构造器,主要是增加了一个参数:x(代表当前的cell) 1 function mxText(a, b, c, d, e, f, g, h, k, i, l, m, n, o, p, q, t, u, v, w, x) { 2...
分类:
其他好文 时间:
2014-09-26 11:10:58
阅读次数:
187
//加入如下代码
-(void)tableView:(UITableView*)tableViewwillDisplayCell:(UITableViewCell*)cellforRowAtIndexPath:(NSIndexPath*)indexPath{
if([tableViewrespondsToSelector:@selector(setSeparatorInset:)]){
[tableViewsetSeparatorInset:UIEdgeInsetsZero];
}
if([t..
分类:
移动开发 时间:
2014-09-25 23:39:48
阅读次数:
218
解决方案:在AppDelegate.h中的didFinishLaunchingWithOptions里面添加:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for custom...
分类:
移动开发 时间:
2014-09-25 23:14:08
阅读次数:
197
使用第三方:MJRefresh
NSString*constMJCollectionViewCellIdentifier=@"Cell";
-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
self.window=[[UIWindowalloc]initWithFrame:[[UIScreenmainScreen]bounds]];
..
分类:
其他好文 时间:
2014-09-25 12:34:19
阅读次数:
480