ngmovieplayer was created by matthias tretter (@myell0w) and philip messlehner (@messphilip).
it is inspired from code from hsplayer.
這兩句一看就是大神封裝的作品啊。
self.movieplayer=[[
ngmovieplayer
alloc
]initwithurl
:self
.movieurl
];self
.movieplayer
.autostartwhenready
=yes
;self
.movieplayer
.delegate
=self;[
self
.movieplayer
addtosuperview
:self
.view
withframe
:self
.view
.bounds
];
然後呢用到了在專案中引用其他專案,
引用的工程我們叫a,被引用的工程叫b
1.要把b的工程,(一般封轉的靜態庫的工程,會生成.a檔案),選中.scodeproj拖動你要引用的工程中去
2.把b工程中的用到的類庫全部新增到a工程中去
並且確認,在link binary with libraries 中已經加入了 b工程中需要的framework, 和b工程生成的framework
至此,你已經可以成功引用自己的工程了,
在你的專案完工的時候,可以直接把b工程打包成.a檔案,這樣,你的核心**就被深深的隱藏了。
注意:在引用成功之後,有時候 #import "***xx.h"的時候,不會自動提示,不用擔心,只要正確引用檔案名字即可,到時候會自動找到。
ios專案中引用其他開源專案
1.將開源專案的.xcodeproj拖入專案frameworks 2.build phases下 links binary with libraries 引入.a檔案。target dependencies裡引入開源專案檔案 3.build setting下的 search paths 裡 head...
ios專案中引用其他開源專案
1.將開源專案的.xcodeproj拖入專案frameworks 2.build phases下 links binary with libraries 引入.a檔案。target dependencies裡引入開源專案檔案 3.build setting下的 search paths 裡 head...
在iOS專案中引入MVVM
本文翻譯自 mvc?還有另外乙個解釋 massive view controller,翻譯過來就是一大堆的view controller的意思。有的時候真的時有這種感覺,view controller太多了。尤其在乙個人晚上加班改bug的時候,感覺更明顯。於是,你會恨不得全部推倒重來算了!從架構的角...