大锐哥iOS技术专栏(与CSDN博客同步更新)
prevention · 共 119 篇文章
iOS Dev (23) 当遇到 #include "a/b.h" 肿么办?
iOS Dev (23) 当遇到 #include "a/b.h" 肿么办? 作者:CSDN 大锐哥 地址: http://blog.csdn.net/prevention 问题 在 iOS 项目中引用 C/C++ 源码,如果遇到: #include "a/b.h" 其实就是为其 Makefile 加上参数 -Ipath-to-include 解决 Project - TARGET - Build Settings - Other C Flags 和 Other C++ Flags 添加 -Ipath-to-include 参考 http://stackoverflow.com/questi…
2014-01-07 16:12 · 评论(0)
iOS Dev (22) 文件、路径
iOS Dev (22) 文件、路径 作者:CSDN 大锐哥 博客: http://blog.csdn.net/prevention 沙箱 Sandbox 的路径 和其他很多应用平台一样,iOS 也限定了每个 APP 的活动范围,只能被限定在一个硬盘空间里,即 Sandbox。如何拿到这个 Sandbox。很容易: NSString *outDirPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; 这个 outDirPath 就是沙箱的 path。 拿到 Resource 的路径 Resource 和…
2014-01-07 01:20 · 评论(0)
iOS Dev (21) 用 AVPlayer 播放一个本地音频文件
iOS Dev (21) 用 AVPlayer 播放一个本地音频文件 作者:CSDN 大锐哥 博客: http://blog.csdn.net/prevention 前言 这篇文章与上一篇极其相似,要注意别看错。 步骤 第一步:在 Project - TARGETS - Project名 - Build Phases - Link Binary With Libraries,添加 AVFoundation.framework。 第二步:创建一个 UIViewController 的子类 PlayerViewController。 第三步:在 PlayerViewController 中添加一…
2014-01-07 00:57 · 评论(0)
iOS Dev (20) 用 AVAudioPlayer 播放一个本地音频文件
iOS Dev (20) 用 AVAudioPlayer 播放一个本地音频文件 作者:CSDN 大锐哥 博客: http://blog.csdn.net/prevention 步骤 第一步:在 Project - TARGETS - Project名 - Build Phases - Link Binary With Libraries,添加 AVFoundation.framework。 第二步:创建一个 UIViewController 的子类 PlayerViewController。 第三步:在 PlayerViewController 中添加一个属性 AVAudioPlayer。 …
2014-01-07 00:32 · 评论(0)
HTML5 Dev (1) Live Video Streaming Player
HTML5 Dev (1) Live Video Streaming Player 作者:CSDN 大锐哥 博客: http://blog.csdn.net/prevention 最简单的视频直播 HTML 直接支持 video 标签。 <html> <head> <title>HTTP Live Streaming Player</title> </head> <body> <video id="vplayer" src="http://live.gslb.letv.com/gslb?stream_id=hunan&tag=live&ext=m3u8&sign=live_tv" heigh…
2014-01-06 15:24 · 评论(0)
iOS Dev (19) 在Xcode中创建iOS动态库的方法
http://blog.csdn.net/hursing/article/details/8951958
2014-01-06 15:21 · 评论(0)
iOS Dev (18) Undefined symbols for architecture xxx: "_main", referenced from ...
Undefined symbols for architecture i386: "_main", referenced from: start in crt1.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) - 解决办法:检查Build Phases, Compile Sources是不是少元素,尤其是 Supporting Files/main.m
2014-01-06 13:01 · 评论(0)
iOS dev (17) 调用麦克风,捕获音频数据
参见:http://www.stefanpopp.de/2011/capture-iphone-microphone/ 项目:https://github.com/fuxx/MicInput
2014-01-06 12:26 · 评论(0)
iOS Dev (16) 一些 OC 的基础知识点小节之一
iOS Dev (16) 一些 OC 的基础知识点小节之一 作者:CSDN 大锐哥 博客: http://blog.csdn.net/prevention 1 静态方法中的 self 在静态方法(类方法)中使用 self ,self 表示这个类。比如以下两个方法的意思是一样的: + (void) wtf { [self alloc]; } + (void) wtf { [ClassName alloc]; } 2 点号的真正含义 OC 中一个对象后面用“.”后面再带一堆东西,表示 get 方法或 set 方法,而不是指成员变量。至于是 get 还是 set 取决于应用场景是需要返回值还是不需…
2014-01-06 10:45 · 评论(0)
iOS Dev (15) TabBarController + NavigationController基础示例
iOS Dev (15) TabBarController + NavigationController基础示例 作者:CSDN 大锐哥 博客: http://blog.csdn.net/prevention 如何把 TabBarController 和 NavigationController 组织到一起? 整个 APP 的 root 是 TabBarController。TabBarController 有一个数组类型的属性,叫 viewControllers。我们在 TabBar 这个数组属性中,装填一些 ViewController。 在一般的应用中(比如微信、微博、QQ、Twitt…
2014-01-05 00:55 · 评论(0)
iOS Dev (14) NavigationController基础示例
iOS Dev (14) NavigationController基础示例 作者:CSDN 大锐哥 博客: http://blog.csdn.net/prevention AppDelegate .h #import <UIKit/UIKit.h> @class ViewController @interface AppDelegate: UIResponder <UIApplicationDelegate> @property <strong, nonatomic> UIWindow *window; @property <strong, nonatomic> ViewController…
2014-01-04 22:46 · 评论(0)
iOS Dev (13) UITableView
iOS Dev (13) UITableView 作者:CSDN 大锐哥 地址: http://blog.csdn.net/prevention AppDelegate .h #import <UIKit/UIKit.h> @class ViewController; @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) ViewController *vc; @end …
2014-01-03 02:42 · 评论(0)
iOS Dev (12) UIView、UIImage和UILabel
iOS Dev (12) UIView、UIImage和UILabel 作者:CSDN 大锐哥 地址: http://blog.csdn.net/prevention AppDelegate .h #import <UIKit/UIKit.h> @class ViewController; @interface AppDelegate: UIResponder<UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) ViewController; …
2014-01-02 01:18 · 评论(0)
iOS Dev (11) 创建一个简单的 UIViewController
iOS Dev (11) 创建一个简单的 UIViewController 作者:CSDN 大锐哥 地址: http://blog.csdn.net/prevention 创建一个 Empty Project 略 创建一个简单的 UIViewController 首先创建一个这样的类的头文件: #import <UIKit/UIKit.h> @interface MyFirstViewController: UIViewController @end 再创建一个源文件 .m: #import "MyFirstViewController.h" @interface MyFirstViewCo…
2014-01-02 00:40 · 评论(0)
iOS Dev (10) 创建一个简单的 UIView
iOS Dev (10) 创建一个简单的 UIView 作者:CSDN 大锐哥 地址: http://blog.csdn.net/prevention 创建一个 Empty App 略 创建一个 UIView - (BOOL) application: (UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; …
2014-01-01 04:13 · 评论(0)