iOS8 size classes可以区分的size
iPad or iPhone 横or竖 iPhone 6 plus or Other iPhone

ellievsbear
wallacepolsom

#extradirty

NASA

tannertan36
Fai_Ryy

roma★

shark vs the universe
let's talk about Bridgerton tea, my ask is open
Show & Tell
ojovivo

titsay
I'd rather be in outer space 🛸

Love Begins
Xuebing Du
Today's Document
🩵 avery cochrane 🩵
Three Goblin Art
seen from United States
seen from Germany

seen from United States
seen from Italy

seen from Malaysia
seen from Italy
seen from United States
seen from Switzerland

seen from Germany
seen from United Kingdom

seen from Malaysia
seen from United States

seen from Italy

seen from Malaysia
seen from Italy

seen from Germany
seen from United States

seen from Sweden
seen from United Kingdom
seen from Australia
@z33
iOS8 size classes可以区分的size
iPad or iPhone 横or竖 iPhone 6 plus or Other iPhone

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
MPMoviePlayerViewController的坑
坑一:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerLoadState:) name:MPMoviePlayerLoadStateDidChangeNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerDidFinished:) name:MPMoviePlayerPlaybackDidFinishNotification object:_moviePlayerViewController.moviePlayer];
这里MPMoviePlayerPlaybackDidFinishNotification必须指定object:参数为moviePlayer即这个ViewController中的MPMoviePlayerController才可以发出来。而MPMoviePlayerLoadStateDidChangeNotification则不需要。
记得之前没这个坑,难道是iOS8之后出的问题?
坑二:
- (void)moviePlayerDidFinished:(NSNotification *)note { [self.moviePlayerViewController.moviePlayer stop]; }
上面是注册了MPMoviePlayerPlaybackDidFinishNotification通知。
在把MPMoviePlayerViewController present出来之后,载入的远程video。当用户点Done要关闭这个present时,需要stop moviePlayer来解决关闭之后仍然播放video的问题。但这还不够。。
仍然有机率会在dismiss之后还播放,貌似因为正在载入远程movie,还没有start,导致stop也无效。所以下面代码是解决办法,注册MPMoviePlayerLoadStateDidChangeNotification通知:
- (void)moviePlayerLoadState:(NSNotification *)note { //检查movie player是不是presenting if (self.moviePlayerViewController.presentingViewController==nil) { [self.moviePlayerViewController.moviePlayer stop]; } }
从Objective-C从引用Swift类容易被忽略的坑
最近手上的几个项目全部打算往swift上过渡。没可能用swift全新重做,所以计划逐步引入swift与原有的objc代码混用。
刚开始引入的时候,完全按apple官方文档操作,但{ProductModule}-Swift.h中死活也不自动生成已经引用项目的swift类。也搜索了很多,无解。
经过反复尝试,原来就算你只从objective-c中调swift,也需要创建并引入bridging header file.这个文件是被用于swift调objective-c的。官方原话:
By default, the generated header contains interfaces for Swift declarations marked with the public modifier. It also contains those marked with the internal modifier if your app target has an Objective-C bridging header.
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html
所以加个bridging header就好了,被官方文档误导了。而且查找Stackoverflow的时候也有人掉坑。
给出两个参考,一个是完整步骤(call swift from objc),和我的答案。
http://stackoverflow.com/questions/24206732/cant-use-swift-classes-inside-objective-c
http://stackoverflow.com/questions/26724438/auto-generated-modulename-swift-h-header-not-including-swift-classes/27540241#27540241
dot product of vectors...
麻汁面,素鸡,卤蛋,烤夫。上海味道。

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Arduino 遥控车计划(二)计划购买配件清单
继续调查了一下,上次提一到的“转向电机”就是“舵机”。 http://www.guokr.com/article/5292
根据我的需求,于是便有了以下购买清单:
❏ Arduino R3+面包版 ❏ XBee S2 1mW Zigbee 无线数传模块 ❏ Qi标准的USB备用电池及充电板 ❏ Arduino camera module(OV7675) + 云台 ❏ 舵机(小车原来带的好像被我转坏了) ❏ 排线若干+LED若干+电阻若干及其它连接用组件 ❏ 工具:万用表等
目前就想到这些,想到再补充更新:2013-02-21
另外项目代码暂定为:法布雷加斯你完蛋了
Arduino 遥控车计划(一)
终于有时间实现自己的遥控车计划啦。
基本的目标如下:
1. 通过iPhone+摄像头远程控制
2. 可以远程控制充电,解决连续长时间控制时断电的风险
3. 用Arduino做为小车的大脑实现控制
不过我对弱电基本上不懂,所以就边学边做吧,正好我手上有一个现成的遥控车,直接拿来改造即可。
首先把车拆开,可以看到一块主控的电路板,有一个27MHz的芯片插在上面。
电池连出来的红黑两根线分别接在电路板上,在电路板上又出来两根分别接在小车后部的电机上。
这里比较容易理解,通过电路板可以接收控制器发出的信号,对电机电路实现连通,而且可以变换正负极使用小车可以向前,向后驱动。
小车前部是转向控制的电机,不过从电路板接出了6板线接在电机上,我就不明白了,需要继续调查一下。
另外发现从电路板出来的线和电机连接处都加上了104电容,查了一下说是为避免扰流,也就是避免通向电机的电流影响摇控器无线电。
上图:
侦查敌情!
the boolshelf i like
Fishing

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming