小编ban*_*ndw的帖子

如何为Cydia商店构建应用程序?

我为Apple的App Store构建了一个应用程序,现在我想将该应用程序提交给Cydia商店.我怎样才能做到这一点?我应该将为App Store构建的app.zip文件发布到Cydia商店吗?

iphone cydia

16
推荐指数
2
解决办法
3万
查看次数

在申请进入后台之前是否有通知?

我正在开发一个iPhone应用程序,需要在应用程序进入后台之前做一些事情,我知道有applicationWillEnterForeground和applicationDidEnterBackground

但是找不到应用程序**EnterBackground通知,有谁知道怎么做?

iphone ios

11
推荐指数
2
解决办法
1万
查看次数

如何在iOS 7上使用UIWebView在后台播放视频


我正在使用YouTube iframe_api在iOS 7上的UIWebView中播放视频,当我点击主页按钮后应用程序转到后台,视频暂停.
有没有办法让视频的音频继续在后台播放?

video youtube-api uiwebview ios

6
推荐指数
0
解决办法
831
查看次数

如何使用ARC在iOS 7中释放私有属性

我正在使用ARC在iOS 7上开发一个项目,我想在发布viewController时发布一个私有属性
这是作为模态视图控制器呈现的TestViewController,将值设置为viewDidLoad中的私有属性testAVPlayer:

//TestViewController.m
#import "TestAVPlayer.h"
@interface TestViewController () {
    TestAVPlayer *testAVPlayer;
}

@end

- (void)viewDidLoad
{
    [self setupPlayer];
}

- (void)setupPlayer {
    AVPlayerItem *item = [AVPlayerItem playerItemWithURL:[[NSBundle mainBundle] URLForResource:@"music" withExtension:@"mp3"]];
    testAVPlayer = [TestAVPlayer playerWithPlayerItem:item];

    [testAVPlayer setActionAtItemEnd:AVPlayerActionAtItemEndNone];
    [testAVPlayer play];
}

- (void)dealloc {
    NSLog(@"dealloc TestViewController: %@", self);
}
Run Code Online (Sandbox Code Playgroud)

TestAVPlayer是AVPlayer的子类,我把一个NSLog放入dealloc

// TestAVPlayer.h
#import <AVFoundation/AVFoundation.h>

@interface TestAVPlayer : AVPlayer

@end

//  TestAVPlayer.m
#import "TestAVPlayer.h"

@implementation TestAVPlayer

- (void)dealloc {
    NSLog(@"dealloc testAVPlayer: %@", self);
}
@end
Run Code Online (Sandbox Code Playgroud)

当TestViewController被解雇时,testAVPlayer似乎永远不会被释放,我看到"dealloc TestViewController",但是在控制台日志中没有"dealloc testAVPlayer"

iphone objective-c ios automatic-ref-counting

5
推荐指数
2
解决办法
1021
查看次数

Detecting touch event outside certain UIView

In my app, to click a button will pop up a UIView, now I want to click anywhere outside of the UIView to dismiss the UIView.
I have tried adding a large transparent button under the UIView, invoke the button action to dismiss the UIView, but the button can't be expanded to Fullscreen because of the top navigationbar and bottom tabbar
Is any other way to achieve?

iphone uiview ios

4
推荐指数
1
解决办法
8175
查看次数

如何将块内的变量分配给objective-c中块外的变量

请参阅将块内的变量分配给块外部的变量
它说它应该添加__block到变量中,但是我在这里看到了objc的Google Youtube示例代码中的一些代码https://code.google.com/p/google- 第279到290行的api-objectivec-client/source/browse/trunk/Examples/YouTubeSample/YouTubeSampleWindowController.m:

_channelListTicket = [service executeQuery:query
                    completionHandler:^(GTLServiceTicket *ticket,
                                        GTLYouTubeChannelListResponse *channelList,
                                        NSError *error) {
// Callback

// The contentDetails of the response has the playlists available for
// "my channel".
if ([[channelList items] count] > 0) {
  GTLYouTubeChannel *channel = channelList[0];
  _myPlaylists = channel.contentDetails.relatedPlaylists;
}
Run Code Online (Sandbox Code Playgroud)

为什么在_myPlaylists__blocks先添加变量的情况下分配变量?

objective-c ios objective-c-blocks

1
推荐指数
1
解决办法
836
查看次数

如何在故事板中向ViewController添加两个UITableView?

在我的应用程序中,我想在一个ViewController中处理2个表.
首先,我将UITableViewController拖到NavigationController中,因此已经有了一个UITableView.
然后我将另一个UITableView拖到场景中,但第二个UITableView不能放在与第一个UITableView相同的级别,它只能是第一个UITableView的子视图或替换第一个UITableView.这是结构,请帮忙.

在此输入图像描述

iphone objective-c uitableview ios

0
推荐指数
1
解决办法
1220
查看次数