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
使用第三方:MJRefresh
NSString*constMJCollectionViewCellIdentifier=@"Cell";
-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
self.window=[[UIWindowalloc]initWithFrame:[[UIScreenmainScreen]bounds]];
..
分类:
其他好文 时间:
2014-09-25 12:34:19
阅读次数:
480
Invalid asset name supplied: , or invalid scale factor: 2.000000错误解决方法:
错误原因:在ios7中设置imageView的image时,实例化image时不能传nil,(cell.imageView.image = [UIImage imageNamed:nil] 上图所报的错,就是因为这句话)。
在ios6中,这...
分类:
其他好文 时间:
2014-09-24 19:59:37
阅读次数:
203
Openxml读取Excel数据:有些问题,如果当Cell里面是日期和浮点型的话,对应的Cell.DataType==Null,对应的时间会转换为一个浮点型,对于这块可以通过DateTime.FromOADate(double d)转换为时间。可是缺点的地方就是,如果Cell.DataType =....
分类:
其他好文 时间:
2014-09-24 02:01:47
阅读次数:
199
Building a Drop-Down Filter List for a DataGridView Column Header Cell参考:http://msdn.microsoft.com/zh-cn/library/aa480727(en-us).aspx1、引用DataGridViewA...
相比于其他的View,UITableView算是用的很广的一个,和UITableView配合使用的是Cell,在程序中可以自定Cell,包括内容样式等UITableView需要一个数据源(dataSource)<UITableViewDataSource>在ViewController中声明做tableView的时候,需要让控制器充当代理的角色在控制..
分类:
其他好文 时间:
2014-09-22 11:52:53
阅读次数:
230
self.view.backgroundColor=[UIColorwhiteColor];
//UICollectionViewLayout不能直接使用,给collectionView的cell提前布局prepareLayout(重写item的方法)
UICollectionViewFlowLayout*flowLayout=[[UICollectionViewFlowLayoutalloc]init];
//cell的大小item的大小
flowLayout..
分类:
其他好文 时间:
2014-09-22 11:35:23
阅读次数:
149
在iOS开发过程中, 我们经常会用到UITableView, 谈到UITableView当然少不了UITableViewCell.那么有时候我们就会有疑惑,怎么样才能让cell的高度根据文字的大小多少,以及照片的高度来动态设计呢?下面我们来看一下,到底怎么做才能让cell的高度动态变化, 让界面看起来更美观协调一些呢?...
分类:
移动开发 时间:
2014-09-20 10:04:27
阅读次数:
159
第一种方法staticNSString*iden=@"dd";TableViewCell*cell=[tableViewdequeueReusableCellWithIdentifier:iden];if(!cell){cell=[[TableViewCellalloc]initWithStyle:UITableViewCellStyleDefaultreuseIdentifier:iden];}returncell;
分类:
其他好文 时间:
2014-09-20 02:25:26
阅读次数:
148