- 博客(17)
- 收藏
- 关注
原创 Label的高度自适应和UItableViewCell的高度自适应
可以先写一个NSString 的拓展@interface NSString (Ext)- (CGSize)calculateSize:(CGSize)size font:(UIFont *)font;@end
2014-09-25 10:36:07 504
原创 上拉刷新,下拉加载(使用MJRefresh)
引入框架 MJRefresh#import "MJTableViewController.h"#import "MJRefresh.h"NSString *const MJTableViewCellIdentifier = @"Cell";/** * 随机数据 */#define MJRandomData [NSString stringWi
2014-09-25 10:22:32 811 1
原创 UIscrollView图片滚动循环
#import @interface YcwViewController : UIViewController@property (strong, nonatomic) IBOutlet UIScrollView *myScrollView;@property (strong, nonatomic)IBOutlet UIPageControl *myPageControl;
2014-09-25 10:11:36 363
原创 UIscrollView滑动图片(不可循环)
storyboard@interface YcwViewController : UIViewController@property (strong, nonatomic) IBOutlet UIScrollView *myScrollView;@property (strong, nonatomic) IBOutlet UIPageControl *myPageContr
2014-09-24 19:11:14 309
原创 SQL查询列出每个班的班号和总人数
select Class.class_name,count(Student.class_id) from Student,Class where Student.class_id = Class.class_id group by Student.class_id
2014-09-05 14:50:35 13591
原创 mysql的post请求
把mysql的php#define kWangyiHeadNewsAPI @"http://localhost:8888/job/jobs.php"
2014-09-04 11:39:46 1863
原创 mysql的get请求
先把mysql的php接口定义为宏#define kSqlUrl @"http://localhost:8888/mysql.php"
2014-09-04 11:33:23 453
转载 Objective-C语法之Category的使用
无论一个类设计的如何完美,都不可避免的会遇到没有预测到的需求,那怎么扩展现有的类呢?当然,继承是个不错的选择。但是Objective-C提供了一种特别的方式来扩展类,叫Catagory,可以动态的为已经存在的类添加新的行为。这样可以保证类的原原来的基础上,较小的改动就可以增加需要的功能。使用Category对类进行扩展时,不需要访问其源代码,也不需要创建子类,这样我们可以扩展系统提供的类。Cate
2014-09-03 10:03:31 236
原创 解决文本框被键盘遮挡
YcwViewController.h@interface YcwViewController : UIViewControllerUITextFieldDelegate> //实现@property (strong, nonatomic) IBOutlet UITextField *emailField;@end
2014-09-01 17:45:42 468
原创 网络加载的图片缓存(做本地化保存)
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ return [array count];}- (UITableViewCell *)tableView:(UITableView *)tableView cellForRow
2014-09-01 14:33:54 435
转载 写一个本地通知(UILocalNotification)
UILocalNotification *notification = [[UILocalNotification alloc]init]; if (notification != nil) { NSLog(@">>支持本地通知"); NSDate *now = [NSDate date]; notificatio
2014-09-01 09:14:16 276
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人