大家都知道,在iOS中,每个vc只能同时展示一个AlertController。
即如果不消掉正在展示的AlertController,是无法展示下一个AlertController的。
在不破坏这个原则的前提下,我们可以使用(NS)OperationQueue,来实现 弹框的串行展示。
首先是DelayedOperation,它对Operation做了一个简单的Hack,支持延迟结束Operation,结束时候调用下finisheOperation即可。
import Fo[......]
大家都知道,在iOS中,每个vc只能同时展示一个AlertController。
即如果不消掉正在展示的AlertController,是无法展示下一个AlertController的。
在不破坏这个原则的前提下,我们可以使用(NS)OperationQueue,来实现 弹框的串行展示。
首先是DelayedOperation,它对Operation做了一个简单的Hack,支持延迟结束Operation,结束时候调用下finisheOperation即可。
import Fo[......]
https://nickharris.wordpress.com/2016/02/10/uialertcontroller-nsoperation/[......]
UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init];
content.body = body;
content.userInfo = userInfo;
content.sound = [UNNotificationSound defaultSound];
[content setValue:@(YES) forKeyPath:@"shouldAlwaysAlertWhil[......]
转载自:http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0731/3247.html
在开发中,我们常常需要ViewPager结合Fragment一起使用,如下图:

我们可以使用三方开源的PagerSlidingTabStrip去实现,或者viewpagerindicator,我一般都偏向前者。现在我们可以使用Design support library库的TabLayout去实现了。最终的效果图:[......]
A good starting point is 24sp for headlines and titles, 16sp for
subheadings, 14sp for body text, and 12sp for captions and fine print.
you can use a line spacing of 1.5 and add 2sp to each line[......]