- 浏览: 340158 次
- 性别:
- 来自: 武汉
最新评论
-
leslie89757:
[img][img][img][img][img][img][ ...
CocoaPods 安装使用 -
hanmeizhi:
very useful to me. Thanks
Dismissing MPMoviePlayerViewController the right way -
luzj:
这个考虑不周全, 在iOS5的键盘高度就不是这个值了,这样写死 ...
UITextView: move view when keyboard appears -
xjg19870111:
不错。
objective-c NSString 常用操作 -
juedui0769:
现在已经不行了!
android源码下载
文章列表
Custom video/camera overlay view on the iPhone
Original Address: http://blog.blackwhale.at/?p=443
Today I am going to show how we can add a custom overlay view to the standard iPhone video capturing functionality. First of all I have to say, that since the iPhone OS 3.1 is published, a custom overl ...
1. UITextField四周的圆角
textField.layer.cornerRadius = 5.0 需要导入框架QuartzCore.framework, 并且在当前类中引用#import <QuartzCore/QuartzCore.h>
2. 光标过于靠前
有时候, 当点击输入框时, 你会发现光标就快挨着左边框了, 很不明显, 这是个很小的用户体验, 解决也很容易, 设置一下UITextField的边框样式
textField.borderStyle = UITextBorderStyleRoundedRect;
设置成这个样式后, 四周也会自带圆角, ...
上架前测试
- 博客分类:
- iphone development
程序完成之后,可能经过内部测试,客户也需要体验下程序运行效果,但开发与客户有时不在同一城市,所以解决的办法是获得客户所用的iPhone的UUID,据此打包一个版本,发送给客户,这样客户也可以体验了。
步骤如下:
把客户的UUID加入到证书中,生成release版本,新建一个”palyload”文件夹,把生成的版本放到这个目录中,压缩变成了payload.zip,把后缀名改成payload.ipa,然后通过iTunes安装就可以了。
如果iPhone手机已经越狱,那连UUID也可以不需要了。
BrowserView.h
#import <UIKit/UIKit.h>
@interface BrowserView : UIView <UIWebViewDelegate, UIScrollViewDelegate> {
UINavigationBar *addressBar_;
UIWebView *webView_;
}
@property (nonatomic, readonly) UINavigationBar *addressBar;
@property (nonatomic, readonly) UIWeb ...
iphone: View on top of UIWebView?
I'm working on a browser app, and I have an address bar on top the UIWebView. On MobileSafari if you scroll down, the address bar starts to move to the top, out of the screen, and the UIWebView doesn't scroll. Only when the address bar disappears completely, it start ...
ios 自定义规则
- 博客分类:
- iphone development
UISearchBar inputAccessoryView
The UISearchBar seems to have the inputAccessoryView as a readOnly property. How do I set it with my own customToolbar ?
The UIResponder (of which UISearchBar is an indirect subclass of) class documentation details a way to accomplish this:
Subclasses that want to att ...
iPhone: Detecting user inactivity/idle time since last screen touch
Has anybody implemented a feature where if the user has not touched the screen for a certain time period, you take a certain action? I'm trying to figure out the best way to do that.
There's this somewhat-related method in UIApplic ...
switch case is in protected scope
Surround each case itself with braces {}. That should fix the issue (it did for me in one of my projects).
整个工程支持UIInterfaceOrientationPortrait,但是MPMoviePlayerViewController必须支持横屏播放功能,解决思路是继承MPMoviePlayerViewController,添加UIDeviceOrientationDidChangeNotification,用比较人性化的UIView动画切换效果强制屏幕切换,并且注意调整UIStatusBar的方向,代码如下:
@interface MyMovieViewController : MPMoviePlayerViewController
@end
@implementation My ...
Best way to parse URL string to get values for keys
I need to parse a URL string like this one:
&ad_eurl=http://www.youtube.com/video/4bL4FI1Gz6s&hl=it_IT&iv_logging_level=3&ad_flags=0&endscreen_module=http://s.ytimg.com/yt/swfbin/endscreen-vfl6o3XZn.swf&cid=241&cust_gen ...
uitableviewcell重用备忘
目前遇到的重用分两种情况
1. tableviewcell布局一样,内容不一样
这种情况一般自定义一个uitableviewcell,加载所有控件,比如uiimageview,uilabel等等,
imageview和label的赋值放在if (cell == nil)外面操作即可,这是最基本重用
2. tableviewcell布局不一样,有2种或者多种布局
这种情况需要自定义多种cell,根据不同情况获取对应布局的cell,代码如下:
static NSString *RootCellIdentifier = @"Directory ...
UIWebView长按图片生成保存菜单
参考:
http://www.icab.de/blog/2010/07/11/customize-the-contextual-menu-of-uiwebview/
http://www.icab.de/blog/2011/10/17/elementfrompoint-under-ios-5/comment-page-1/#comment-30184
自定义UILongPressGestureRecognizer
创建 UnpreventableUILongPressGestureRecognizer.h
#import <Foundation ...
枚举相同格式的文件:
You can achieve this pretty easily with the help of NSPredicate, like so:
NSString *bundleRoot = [[NSBundle mainBundle] bundlePath];
NSFileManager *fm = [NSFileManager defaultManager];
NSArray *dirContents = [fm contentsOfDirectoryAtPath:bundleRoot error:nil];
NSPredicate *fltr = [NSP ...
- (UITableViewCell *) tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = ...
// remove blue selection
cell.selectionStyle = UITableViewCellSelectionStyleNone;
UILongPressGestureRecognizer *gesture = [[[UILongPressGestureRec ...
Working with Directories in Objective-C
original address: http://www.techotopia.com/index.php/Working_with_Directories_in_Objective-C
A key element of gaining proficiency in any programming language involves the ability to work with files and file systems. The level of difficulty in working with fi ...