iOS
peterpansh
等写
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
iPhone – Configuring the AVAudioSession and Output Audio to iPhone Speaker
http://eureka.ykyuen.info/2010/06/02/iphone-configuring-the-avaudiosession-and-output-audio-to-iphone-speaker/ iPhone – Configuring the AVAudioSession and Output Audio to iPhone Speaker Po转载 2012-07-24 11:07:09 · 9381 阅读 · 0 评论 -
蓝牙与外设交互(防丢器)
http://code4app.com/ios/%E8%93%9D%E7%89%99%E4%B8%8E%E5%A4%96%E8%AE%BE%E4%BA%A4%E4%BA%92-%E9%98%B2%E4%B8%A2%E5%99%A8/53858596933bf0b3718b52dc转载 2014-06-20 13:39:22 · 1216 阅读 · 0 评论 -
Using Swift with Cocoa and Objective-C--互用性-与ObjC API交互
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithObjective-CAPIs.html#//apple_ref/doc/uid/TP40014216-CH4-XID_26 http://www.cocoac转载 2014-06-11 08:44:44 · 4621 阅读 · 0 评论 -
iOS 目录读取
App Path : NSLog(@"[[NSBundle mainBundle] bundlePath]=%@", [[NSBundle mainBundle] bundlePath] ); DocumentDirectory : NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,原创 2013-05-08 17:25:13 · 755 阅读 · 0 评论 -
iPhone5判断
#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)原创 2013-05-08 17:42:35 · 537 阅读 · 0 评论 -
ios截屏
#import CGRect screenRect = [[UIScreen mainScreen] bounds]; UIGraphicsBeginImageContext(screenRect.size); CGContextRef ctx = UIGraphicsGetCurrentContext(); [[UIColor blac原创 2012-09-07 15:52:02 · 689 阅读 · 0 评论 -
ffmpeg
http://wenku.baidu.com/view/58109f2eb4daa58da0114a30.html转载 2012-09-07 10:46:01 · 466 阅读 · 0 评论 -
Converting Audio (mp3 etc) files to m4a with AVAssetExportSession
http://unlimapps.com/?p=41转载 2012-09-06 11:25:33 · 1452 阅读 · 0 评论 -
mp3 iphone
1) MPMusicPlayerController *myPlayer = [MPMusicPlayerControllerapplicationMusicPlayer]; [myPlayer setQueueWithQuery: [MPMediaQuerysongsQuery]]; [myPlayer play]; ///////原创 2012-09-04 12:27:41 · 790 阅读 · 0 评论 -
mms
http://www.binpress.com/app/radiotunes-sdk-for-ios/596原创 2012-08-27 14:50:43 · 807 阅读 · 1 评论 -
iphone后台运行音频
1) UIBackgroundModes audio 2) NSError *setCategoryErr = nil; NSError *activationErr = nil; [[AVAudioSession sharedInstance] setCategory: AVAudioS原创 2012-08-27 14:13:35 · 861 阅读 · 0 评论 -
读取mp3里的图片
NSURL *url = [NSURL URLWithString:@"http://xxx.mp3"]; AVAsset *asset = [AVAsset assetWithURL:url]; for (AVMetadataItem *metadataItem in asset.commonMetadata) { if ([meta原创 2012-08-27 11:39:30 · 1372 阅读 · 0 评论 -
UILocalNotification
UILocalNotification *notification=[[UILocalNotificationalloc] init]; if (notification!=nil) { NSLog(@">> support local notification"); NSDate *now=[NSDatenew]; notific转载 2012-08-29 12:47:55 · 548 阅读 · 0 评论 -
iphone 后台循环播放音乐
http://www.devdiv.com/forum.php?mod=viewthread&tid=131889&highlight= http://www.diwublog.com/archives/89转载 2012-08-29 00:49:57 · 1094 阅读 · 0 评论 -
ios gb2312转utf-8
+(NSString *) gb2312toutf8:(NSData *) data{ NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000); NSString *retStr = [[NSString alloc] i原创 2012-08-11 11:20:03 · 2117 阅读 · 0 评论 -
卓越用户体验的5个共同点
如果你已经在用移动社交的Path,你一定会非常享受其卓越的用户体验。Path拥有非常精致的设计,而且非常易于使用。换句话说就是Path拥有非常棒的用户体验。这不是一个高科技产品是否需要采用的决定性元素,但确是能够决定多少用户来使用的重中之重。 1. 典雅的UI 好的用户体验是离不开UI的,而且作用很大。尽管我不是一个合格的Path用户,但是当打开的时候,我还是会浏览一遍。顶端的5个转载 2012-02-10 13:51:08 · 497 阅读 · 0 评论 -
Notification
appDelegate里面:-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo; 通过userinfo获取推送过来的东西;如果程序没启动的情况下通过push启动的话在- (BOOL)application:(UIApplication *)ap转载 2012-07-16 10:27:01 · 944 阅读 · 0 评论 -
判断用户设备是iPad还是iPhone的代码
#define isPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)原创 2012-07-03 13:23:16 · 596 阅读 · 0 评论 -
objective-c 前后去空格,去行
NSString* str = @" \n\n\n\n\n string\nstring \n \n \n "; NSString* str2 = [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; //前后去空格 NSString* str3 = [str原创 2012-07-12 11:08:53 · 2467 阅读 · 0 评论 -
设置圆角
#import icon.layer.masksToBounds = YES; icon.layer.cornerRadius = 5.0; icon.layer.borderWidth = 0.5; icon.layer.borderColor = [[UIColor grayColor] CGColo原创 2012-07-12 07:39:50 · 463 阅读 · 0 评论 -
如何启用长按事件
UILongPressGestureRecognizer *longPressGR = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress原创 2012-07-09 17:42:29 · 603 阅读 · 0 评论 -
iOS延时执行的几种方法
1. 最直接的方法performSelector:withObject:afterDelay: 这种方法的缺点:每次要为延时写一个方法 2. @implementation NSObject (PerformBlockAfterDelay) - (void)performBlock:(void (^)(void))block afterDel转载 2012-07-09 17:39:16 · 2185 阅读 · 0 评论 -
UIPanGestureRecognizer类——为view添加手势
#import UIKit/UIKit.h> @interface TestGestureRecognizerViewController : UIViewController { UIView *aView; } @property(nonatomic,retain)IBOutlet UIView *aView; @end ////转载 2012-07-09 17:28:39 · 627 阅读 · 0 评论 -
SDWebImage回调
[cell.imageView setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"] placeholderImage:[UIImage imageNamed:@"placeholder.png"] succe原创 2012-07-09 09:13:13 · 1106 阅读 · 0 评论 -
iPhone读取网页内容乱码解决方案
读取的中文网页编码集是gb2312,进行如下转换可正常显示中文: NSString *urlStr="your url"; NSURL *url = [NSURL URLWithString:urlStr]; NSData *data = [NSData dataWithContentsOfURL:url]; NSStringEncoding enc = CFStringConv原创 2012-07-07 06:31:06 · 5522 阅读 · 0 评论 -
iOS推送消息实现
向iPhone、iPod Touch发送消息都需要认证的,下面是以向iPhone推送消息: 一、开通“Apple Push Notification Service” 1.进入 Provisioning Protal 2.选择App IDs 3.选择要开通“Apple Push Notification service”的AppID,点击“Configure”链接 4转载 2012-07-06 10:59:30 · 2417 阅读 · 0 评论 -
Sizes of iPhone UI Elements
Sizes of iPhone UI Elements Element Size (in points) Window (including status bar) 320 x 480 pts Status Bar (How to hide the status bar) 20 pts View inside window转载 2012-02-11 13:07:06 · 449 阅读 · 0 评论 -
2012年移动应用十大设计趋势
2011年涌现出诸多优秀设计,随着操作系统的更新和硬件性能的提升,用户对移动应用的品质需求也呈现上升趋势,界面设计又被提升到一个新的高度。移动应用不再是将内容从互联网搬至移动设备,而是解决设备本身的问题,根据用户需求从视觉感受、风格趋势、操作方式、信息架构和内容呈现等各个方面挖掘设计的可能性,为用户带来新颖的体验。 本文汇总今年热门产品的界面设计,从中总结出未来一年需要重点关注的设计趋势,供转载 2012-02-10 15:06:22 · 634 阅读 · 0 评论 -
为iOS5设计消息通知
通知中心作为iOS5的重大更新内容之一,可以将用户的iOS设备里的所有的通知集中放在一 个地方,大大方便用户查看和管理。如果用户收到一封新邮件、一条短信,或者是一个添加好友的请求,无论在任何界面下(包括游戏等全屏应用),用户都可以通 过从屏幕顶部向下滑,将通知中心“拉下来”,用户可以在这里查看到所有的通知。所以苹果在iOS5的介绍中说到通知中心是你随时掌握最新生活资讯的绝佳途 径。转载 2012-02-10 15:04:57 · 780 阅读 · 0 评论
分享