摘要: 问:I have some data like this :1, 111, 2, 333, 45, 67, 322, 4445NSArray *array = [[myData allKeys]sortedArrayUsingSelector: @selector(compare:)];If I run this code, it sorted like this:1, 111, 2,322, 333, 4445, 45, 67,but I actually want this:1, 2, 45, 67, 111, 322, 333, 4445How can I implement it? t 阅读全文
posted @ 2011-10-18 17:16 Piosa 阅读(772) 评论(0) 推荐(0) 编辑
摘要: 如下图所示:section所显示的灰色背景和白色字体是默认的,调用以下方法即可实现- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { return [self.keys objectAtIndex:section];}如果想改变此处的背景与字体的话,官方没有开放接口去直接修改以上两个属性,所以,只有自己加Label,加View去实现,代码如下:实现委托方法- (UIView *)tableView:(UITableView *)tableView vie... 阅读全文
posted @ 2011-10-18 17:10 Piosa 阅读(17960) 评论(0) 推荐(1) 编辑
摘要: 把以下的xml文件<?xml version="1.0" encoding="utf-8"?><hotelCities> <city> <type>HOT</type> <cityname>热门城市</cityname> </city> <city> <type>HOT</type> <cityname>北京</cityname> <citycode>PEK</citycode> 阅读全文
posted @ 2011-10-18 14:26 Piosa 阅读(3842) 评论(0) 推荐(0) 编辑
摘要: CATransition *transition = [CATransition animation]; transition.duration = 1.0f;//间隔时间 transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];//动画的开始与结束的快慢 /* kCATransitionFade; kCATransitionMoveIn; kCATransitionPush; kCA... 阅读全文
posted @ 2011-10-18 10:39 Piosa 阅读(2734) 评论(0) 推荐(0) 编辑