我想测试目标添加到我的项目,然而,当我进行的测试,好像不被执行的实际测试,而不是Xcode的报道总是成功,但小方这表明,如果测试通过与否遗体明确.
我只有一个测试目标和一个类:
@implementation Tests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testExample {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct …Run Code Online (Sandbox Code Playgroud) 我正在使用Youtube API,我想拥有一个搜索自动完成功能,就像在YouTube上一样,当您在搜索输入框中输入内容时,它会为您提供搜索建议.我已经阅读了文档,但仍然缺少,这是否可以使用API?
好的,所以我的应用程序播放视频,我希望声音继续在后台播放.但是当我点击"Home"按钮时播放停止.我正在使用iOS 5.0.1测试iPhone 4s
什么工作?
怎么了?
我做了什么:
在app delegate的应用程序中添加了以下代码:didFinishLaunchingWithOptions:
NSError *setCategoryErr = nil;
NSError *activationErr = nil;
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error:&setCategoryErr];
[[AVAudioSession sharedInstance] setActive:YES error:&activationErr];
Run Code Online (Sandbox Code Playgroud)
在我的视图控制器中,我实现了接收远程控件的方法:
- (BOOL)canBecomeFirstResponder {
return YES;
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
[self becomeFirstResponder];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
//End recieving events
[[UIApplication …Run Code Online (Sandbox Code Playgroud) autocomplete ×1
avplayer ×1
background ×1
ios5 ×1
search ×1
unit-testing ×1
video ×1
xcode7 ×1
xctest ×1
youtube ×1
youtube-api ×1