-
Install cocoapods
gem install cocoapods
-
Install pods
pod install
-
Open .xcworkspace
open DoubanFM.xcworkspace
wangwangwar / doubanfm Goto Github PK
View Code? Open in Web Editor NEWYet Another Douban FM Client for iOS
Yet Another Douban FM Client for iOS
异常信息:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Signal <RACDynamicSignal: 0x175c2130> name: is already bound to key path "songs" on object <SongStore: 0x1758e510>, adding signal <RACDynamicSignal: 0x176d1d40> name: is undefined behavior'
经常收到"Received memory warning"。
可能的大内存消耗:
RT
这是由于每次请求API,只会返回几首歌曲。
改进措施:需要在最后一首歌曲播放完毕后再次请求API,把数据append,(或者播放开始时提前获取)。
在- [MainViewController viewDidLoad]
中,我们有这样的绑定:
@weakify(self)
[RACObserve([SongStore sharedStore], songs) subscribeNext:^(NSArray *songs) {
@strongify(self)
[self changeSong:songs[self.currentSongIndex]];
}];
而- [MainViewController changeSong:]
中有更新Time Label和Progress Bar的操作,这些属于UI的操作必须在主线程中执行。RAC默认是在自定义线程中执行代码,为了让UI更新,我们需要指定主线程,RAC提供了相应的API:- [RACSignal deliverOn:]
。
RT
SongStore
ImageStore
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.