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:
是否有任何其他的方式来关闭它?谢谢你的想法!
我找到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,请参阅开发人员文档.谢谢!
如您所知,使用MPMoviePlayerController对象播放电影
[[MPMoviePlayerController alloc] initWithContentURL: aURL];
Run Code Online (Sandbox Code Playgroud)
现在,我想实现一个自定义NSURLProtocol,我将在其中解密已被AlgorithmDES加密的电影源.那可能吗?谢谢你给予任何想法.需要你的帮助〜
我是新来的,我不知道如何使用这个......这是我的代码:
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) 在 UIResponder
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
Run Code Online (Sandbox Code Playgroud)
[event allTouches]和之间有什么区别[touches allObjects]?
如您所知,当我使用MPmoviePlayerController播放电影时,moviePlayer应该在moviePlayer视图的中心显示一个activityIndicatorView.现在,我已经在我的程序中放置了一个自定义activityIndicatorView,我只想隐藏或删除MPMoviePlayController的activityIndicatorView,我可以这样做吗?
据我所知
moviePlayer.duration
,我知道可以获得电影的持续时间
playableDuration,
initialPlaybackTime,endPlaybackTime,
但是我想得到moviePlayer的当前播放时间.如果有这种方法,应该将哪个Notification发送到哪里,谢谢!
iphone ×5
ios ×2
ipad ×2
dismiss ×1
gdata-api ×1
objective-c ×1
touch ×1
uialertview ×1
url ×1