MTStatusBarOverlay 的使用

https://github.com/myell0w/MTStatusBarOverlay/

库地址。


我在xcode4.2-ios5下测试使用,不使用arc。

我按照文档中说的,做的。

If you use MTStatusBarOverlay in a non-ARC project, add "-fobjc-arc" to the Compiler Flags of MTStatusBarOverlay.m in your target's "Build Phases" tab under Compile Sources.

这样在ios5下运行是没有问题的,但是要编译在ios4下运行,还需要加入一个参数

you have to add "-fobjc-arc" to "Other Linker Flags" of your projec
需要在link里加这个,搞定!!

否则执行代码,程序就闪退了。

使用上:

// shows an activity indicator and the given message

- (void)postMessage:(NSString *)message;

- (void)postMessage:(NSString *)message duration:(NSTimeInterval)duration;

- (void)postMessage:(NSString *)message duration:(NSTimeInterval)duration animated:(BOOL)animated;

- (void)postMessage:(NSString *)message animated:(BOOL)animated;

// clears the message queue and shows this message instantly

- (void)postImmediateMessage:(NSString *)message animated:(BOOL)animated;

- (void)postImmediateMessage:(NSString *)message duration:(NSTimeInterval)duration;

- (void)postImmediateMessage:(NSString *)message duration:(NSTimeInterval)duration animated:(BOOL)animated;


像这样的函数就有3组,还有两个是finish和error的,应该只是显示出来进度还是勾勾之类的。

使用上需要注意一点,- (void)postMessage:(NSString *)message;这个函数,是要手动去调用hide函数来结束的。如果在结束之前,又执行了一此其他的post就会导致这样的错误。

 Assertion failure in -[_UITableViewUpdateSupport _computeRowUpdates], /SourceCache/UIKit_Sim/UIKit-1912.3/UITableViewSupport.m:386

2012-02-03 11:47:30.856 SBTableTest[1024:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid table view update.  The application has requested an update to the table view that is inconsistent with the state provided by the data source.'



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值