![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Objective-C
文章平均质量分 64
Hobo86
这个作者很懒,什么都没留下…
展开
-
iOS:转一个UITableView中异步加载图片方法
先说使用,再给定义使用方法:- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"ImageCell"; UITab...原创 2011-04-20 21:28:45 · 113 阅读 · 0 评论 -
iOS:横向使用iPhone默认的翻页效果
大致思路使用两层辅助UIView的旋转来实现添加后的View的横向翻页效果 CATransform3D transformA = CATransform3DRotate(CATransform3DIdentity, degreesToRadian(90), 0, 0, 1.0f); CATransform3D transformB = CATransform3DRotate(...原创 2011-04-20 22:21:36 · 242 阅读 · 0 评论 -
iOS:NSData年、月、星期、日、时、分、秒获取及NSDataToNSString方法
在 NSDate中获得时间信息,年、月、星期、日、时、分和秒: NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDate *now; NSDateComponents *comps = [[NSDateComponents alloc...原创 2011-04-22 20:34:23 · 184 阅读 · 0 评论 -
iOS:几个实用方法:点间距离、点间角度、线间角度
#include <math.h> #define pi 3.14159265358979323846 #define degreesToRadian(x) (pi * x / 180.0) #define radiansToDegrees(x) (180.0 * x / pi) CGFloat distanceBetweenPoints (CGPoint first, CGPoi...原创 2011-04-22 21:40:17 · 431 阅读 · 0 评论 -
iOS:使用腾讯的SDK将新浪微薄嵌入到应用中
最近在做应用中添加SNS分享功能,只需要分享功能,腾讯的SDK和Demo还是挺直观的,看了下基本上就能用了,而新浪的Oauth认证看了个例子是跳出程序到Web上去认证的,体验很不好。不过Oauth认证这个过程都差不多,所以就直接将QQ的做了写修改,使用比较方便。 1:把Delegate中下的key和secret改成自己的,如果你喜欢在模拟器中输入可以不写 ! 2:把Q...2011-05-13 17:51:37 · 123 阅读 · 0 评论 -
iOS:等比压缩截图
将一幅图片按着需要的尺寸进行等比的压缩和放大,最后再截取需要尺寸部分,不知道说清楚没,反正就那意思吧!+(UIImage *)compressImageWith:(UIImage *)image width:(float)width height:(float)height { float imageWidth = image.size.width; float image...2011-06-24 18:07:49 · 126 阅读 · 0 评论 -
iOS:NSString生成UIImage
-(UIImage *)imageFromText:(NSString *)text width:(float)width height:(float)height { // set the font type and size UIFont *font = [UIFont systemFontOfSize:12.0]; CGSize size = CGSizeMak...原创 2011-07-12 16:04:38 · 187 阅读 · 0 评论 -
iOS:UITextView中return key点击事件的监听方法
可以这样解决,在- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text中监听replacementText,如果为回车则将键盘收起 - (BOOL)textView:(UITextView *)textView s...原创 2012-05-19 11:23:48 · 327 阅读 · 0 评论 -
iPhone:本地打开设置链接列表
prefs:root=General&path=Aboutprefs:root=General&path=ACCESSIBILITYprefs:root=AIRPLANE_MODEprefs:root=General&path=AUTOLOCKprefs:root=General&path=USAGE/CELLULAR_USAGEpre...原创 2013-03-30 16:14:23 · 166 阅读 · 0 评论