IOS提供了叫做MPMoviePlayerController MPMoviePlayerViewController两个类,可以轻松用来实现视频播放。MPMoviePlayerViewController只能全屏播放视频。
#import "MainViewController.h"
#import
@interface MainViewController ()
//视频播放器
@pr...
分类:
移动开发 时间:
2014-07-03 16:39:10
阅读次数:
195
Swift 中的方法是与特定类型(类和结构体)相关的函 数。实例方法 隶属于某个特定类型(类或结构体)实例函数。 class Counter{var count = 0funcincrement() {count++}funcincrementBy(amount: Int) {count += amount}func reset() {count = 0}}let counter = Counte...
分类:
其他好文 时间:
2014-06-30 20:22:51
阅读次数:
301
函数定义 使用 func 定义一个函数。调用函数使用他的名字加 上小括号中的参数列表。使用 -> 分隔参数的名字和 返回值类型。 函数声明: func greet(name: String, day: String) -> String {
return "Hello \(name),today is \(day)."
} 函数调用:greet("Bob", "Tuesday") 无返回值函数...
分类:
其他好文 时间:
2014-06-25 10:04:23
阅读次数:
255
语法: { (parameters) ->return type in statements} 实例:采用函数实现: let names =["Chris", "Alex", "Ewa", "Barry", "Daniella"]
funcbackwards(s1: String, s2: String) -> Bool {
return s1 > s2
}
var reversed = sort...
分类:
其他好文 时间:
2014-06-25 10:01:29
阅读次数:
224
ios UIWebView 播放优酷土豆视频...
分类:
移动开发 时间:
2014-06-25 06:58:32
阅读次数:
278
字典初始化 基本语法: [key 1: value 1, key 2: value 2, key 3: value3] var airports: Dictionary = ["TYO": "Tokyo", "DUB":"Dublin"] 字典追加元素 var airports: Dictionary = ["TYO": "Tokyo", "DUB":"Dublin...
分类:
其他好文 时间:
2014-06-22 16:49:01
阅读次数:
173
数组初始化基本语法:[value 1, value2, value 3] var shoppingList: String[] = ["Eggs","Milk"]数组追加元素 append 函数追加 或通过+操作符var shoppingList: String[] = ["Eggs", "Milk"] hoppingList.appe...
分类:
其他好文 时间:
2014-06-21 23:52:58
阅读次数:
375
最近刚转了游戏,来公司不久就接到一个任务就是做一个视频播放的功能,自己花了3天时间,暂时实现了一个简易的功能,特写篇博客,以作记录。参考地址如下:http://blog.csdn.net/xiaominghimi/article/details/6870259http://blog.csdn.net...
分类:
移动开发 时间:
2014-06-21 09:00:29
阅读次数:
1207