小编ben*_*ben的帖子

有一段时间后,有没有办法解雇一个无按钮UIalertView?

UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"tittle"
               message:@""
                 delegate:self
              cancelButtonTitle:@""
              otherButtonTitles:nil];
  [alertView show];
  [alertView release];
Run Code Online (Sandbox Code Playgroud)

我想dimiss的alerview它显示了一段时间后,但是当alertview没有按钮,如果我调用它不工作-dismissWithClickedButtonIndex:animated: method,而─ performSelector:withObject:afterDelay: 是否有任何其他的方式来关闭它?谢谢你的想法!

objective-c uialertview dismiss ios

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

为什么MPMovieLoadState有州5?

我找到MPMoviePlayerController.h,有

enum {
    MPMovieLoadStateUnknown        = 0,
    MPMovieLoadStatePlayable       = 1 << 0,
    MPMovieLoadStatePlaythroughOK  = 1 << 1, // Playback will be automatically started in this state when shouldAutoplay is YES
    MPMovieLoadStateStalled        = 1 << 2, // Playback will be automatically paused in this state, if started
};
typedef NSInteger MPMovieLoadState;
Run Code Online (Sandbox Code Playgroud)

但是当我这样做的时候

NSLog(@"%d",player.loadState)

它打印出5或有时3,它是如何发生的?我知道loadstate的值为0,1,2,4,请参阅开发人员文档.谢谢!

iphone mpmovieplayercontroller iphone-sdk-3.0

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

如何使用自定义NSURLProtocol使用URL播放电影?

如您所知,使用MPMoviePlayerController对象播放电影

[[MPMoviePlayerController alloc] initWithContentURL: aURL];
Run Code Online (Sandbox Code Playgroud)

现在,我想实现一个自定义NSURLProtocol,我将在其中解密已被AlgorithmDES加密的电影源.那可能吗?谢谢你给予任何想法.需要你的帮助〜

url mpmovieplayercontroller nsurlprotocol ios

8
推荐指数
3
解决办法
8141
查看次数

我的程序中使用GData xmlsupport出错了

我是新来的,我不知道如何使用这个......这是我的代码:

NSString *strParse=@"url";
NSURL *urlParse=[NSURL URLWithString:strParse];
NSString *content=[[NSString alloc] initWithContentsOfURL:urlParse];
NSError *error;
GDataXMLDocument *document=[[GDataXMLDocument alloc] initWithXMLString:content options:0 error:&error];
Run Code Online (Sandbox Code Playgroud)

---------------------- XML -----

<?xml version="1.0" encoding="UTF-8"?>
<root>
<head>
<version>20100514103110</version>
</head>
<channels>
<channel>
<id>1</id>
<name>
<![CDATA[]]>
</name>
<uuid>
<![CDATA[21001]]>
</uuid>
<site_url>
<![CDATA[http://]]>
</site_url>
<pics>
<url>
<![CDATA[/21001/cms_images/channel/2010-01/21/channel_51224251664216081527429.png]]>
</url>
<url>
<![CDATA[/21001/cms_images/channel/2010-01/21/channel_82864703356323359638124.png]]>
</url>
<url>
<![CDATA[/21001/cms_images/channel/2008-07/04/channel_67535050807177704592393.swf]]>
</url>
<url>
<![CDATA[]]>
</url>
<url>
<![CDATA[]]>
</url>
</pics>
<linkurls>
<url>
<![CDATA[]]>
</url>
<url>
<![CDATA[]]>
</url>
<url>
<![CDATA[]]>
</url>
</linkurls>
<description>
<![CDATA[]]>
</description>
<provider>
<![CDATA[]]>
</provider>
<attr>3</attr>
<props>
<prop1>
<![CDATA[21001/movie_shell.swf]]>
</prop1>
<prop2> …
Run Code Online (Sandbox Code Playgroud)

iphone gdata-api

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

[event allTouches]和[touches allObjects]之间的区别?

UIResponder

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
Run Code Online (Sandbox Code Playgroud)

[event allTouches]和之间有什么区别[touches allObjects]

iphone touch ipad iphone-sdk-3.2

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

在moviePlayerController中隐藏ActivityIndi​​cator

如您所知,当我使用MPmoviePlayerController播放电影时,moviePlayer应该在moviePlayer视图的中心显示一个activityIndi​​catorView.现在,我已经在我的程序中放置了一个自定义activityIndi​​catorView,我只想隐藏或删除MPMoviePlayController的activityIndi​​catorView,我可以这样做吗?

iphone mpmovieplayer uiactivityindicatorview iphone-sdk-3.2

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

如何从moviePlayer获取当前播放时间?

据我所知
moviePlayer.duration ,我知道可以获得电影的持续时间

playableDuration, initialPlaybackTime,endPlaybackTime,

但是我想得到moviePlayer的当前播放时间.如果有这种方法,应该将哪个Notification发送到哪里,谢谢!

iphone mpmovieplayercontroller ipad iphone-sdk-3.2

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