Fork me on GitHub
上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 125 下一页

2012年3月26日

摘要: 在 iPhone 上面開發應用程式時, 在使用輸入鍵盤時, 或多或少都會遇到客制化鍵盤的問題, 這邊筆者以簡單的數字鍵盤來示範客制化的動作. 這部份我想網路上已經有不少 sample code , 但大部份基本上都是以 SDK 3.x 的版本去實作, 以"特定寫法"來實作客制化在 iOS4 會有問題, 這部份稍候會提到兩版本的差異.上述看到的例子是UIKeyboardTypeNumberPad搭配 "Done" 的圖示所組合而成的. 在開始介紹如何實作之前, 先稍微提一下網路上查到的一些範例寫法. 因為 SDK 升版之後在架構上有做了些修改, 所以導致行 阅读全文
posted @ 2012-03-26 16:45 pengyingh 阅读(6870) 评论(0) 推荐(0)
摘要: Notification是智能手机应用编程中非常常用的一种传递信息的机制,而且可以非常好的节省资源,不用消耗资源来不停地检查信息状态(Pooling),在iOS下应用分为两种不同的Notification种类,本地和远程。本地的Notification由iOS下NotificationManager统一管理,只需要将封装好的本地Notification对象加入到系统Notification管理机制队列中,系统会在指定的时间激发将本地Notification,应用只需设计好处理Notification的方法就完成了整个Notification流程了。本地Notification所使用的对象是UI 阅读全文
posted @ 2012-03-26 16:32 pengyingh 阅读(8963) 评论(1) 推荐(1)
摘要: 说明:示范如何利用UIWebView来播放网络多媒体档案,并提供[WAV音效]、[MP3音乐]以及[MP4影片]等三种类型的预设连结。可自行输入多媒体档案的网络位置或点选由范例所提供的三组不同格式的多媒体档案按下播放,将透过UIWebView呼叫Safari内建的影音接口来播放WAV格式的音效播放MP4格式的影片流程:1.建立一个 View-Based Application 的项目并命名为 iPlayer2.在iPlayerViewController.h及iPlayerViewController.m中参考下方的程序代码加入3.打开iPlayerViewController.xib 在 I 阅读全文
posted @ 2012-03-26 16:14 pengyingh 阅读(207) 评论(0) 推荐(0)
摘要: 有一个3gp格式的视频,放在服务器上,比方说在http://65.49.19.44:9528/videos/ZAWIIlXNGwY.3gp。 我使用如下代码,无法从远程直接播放,显示错误“The server is not correctly configured”。但我把这个视频下载到本地,只把URL改成本地路径,就可以用MPMoviePlayerController成功播放。这个链 接是有效的,请帮我看看我是哪里设置不对,还是链接格式不对?-(void)playMovieButtonPressed{movieURL = [NSURL URLWithString:@"http:// 阅读全文
posted @ 2012-03-26 16:12 pengyingh 阅读(2315) 评论(0) 推荐(0)
摘要: Apple made significant changes to theMPMoviePlayerController API:s in iOS 3.2. Before, all you had to do was to initialize theMPMoviePlayerController and call play. Now things are a bit more complicated because videos can be played on a portion of the screen (good for the iPad) and not just in full 阅读全文
posted @ 2012-03-26 16:07 pengyingh 阅读(314) 评论(0) 推荐(0)
摘要: Instructions on how to set up an application namedvodto stream video on demand content to all supported player technologies.Updated for Wowza Media Server 2.2.0 (19 November 2010)For this tutorial we will use thesample.mp4sample video file that is located in the[install-dir]/contentfolder:Create app 阅读全文
posted @ 2012-03-26 16:00 pengyingh 阅读(2897) 评论(0) 推荐(0)
摘要: XCode工程内多Targets教程作者 透明de面具原帖地址http://www.cocoachina.com/bbs/read.php?tid-10972-fpage-0-toread--page-1.html 相信很多人都注意到XCode中, 有个Target的概念. 这在很多地方都有所体现, 比如打开一个工程后, 左侧的列表中有Targets一项, 而在工程界面的顶部菜单中, project里面也有多个涉及到Target的项目, 那么这个Target到底是什么呢?Apple 的人是这样说的:“ Targets that define the products to build. A t 阅读全文
posted @ 2012-03-26 15:58 pengyingh 阅读(380) 评论(0) 推荐(0)
摘要: 记住用户上次播放的位置,然后下次播放时从历史时刻开始...获取 MPMovieDurationAvailableNotification 这个消息后 修改播放的位置1。[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(durationAvailable:) name:MPMovieDurationAvailableNotification object:nil];2。- (void) durationAvailable:(NSNotification*)notification{NSLog(@&q 阅读全文
posted @ 2012-03-26 15:18 pengyingh 阅读(461) 评论(0) 推荐(0)
摘要: 如题,该怎么实现在播放所有的视频事前先播放一段广告,求思路。。。。。。查了下文档,发现了这个东东MPMoviePlayerPlaybackDidFinishReasonUserInfoKey;可以通过这样NSNumber* reason = [[notification userInfo] objectForKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey];switch ([reason intValue]) {case MPMovieFinishReasonPlaybackEnded:NSLog(@"playbackFinis 阅读全文
posted @ 2012-03-26 15:00 pengyingh 阅读(1376) 评论(0) 推荐(0)
摘要: 大家好!我想把一个本地的一个xml文件上传的指定的服务器上,并且取得服务器返回给我的数据。我用一个很简单的界面,就是一个按钮和一个textview。当我点击按钮时,开始发送我的xml文件到服务器,我们的程序把数据发送完成后得到服务器返回的数据,将其打印到textview上。但是我的程序得到的返回数据时bad request。大家帮我看看到底哪里错了,应该如何才能上传文件呢?主要代码如下://URLNSString *urlString = @"http://synkontact.appspot.com/backup?name=myfirstbackup";NSString 阅读全文
posted @ 2012-03-26 11:46 pengyingh 阅读(245) 评论(0) 推荐(0)
上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 125 下一页

导航