![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
UIKit
文章平均质量分 69
leonpengweicn
这个作者很懒,什么都没留下…
展开
-
UIAlertView (ProgressHUD)
//// UIAlertView+ProgressHUD.h// WPUIKit//// Created by Peng Leon on 12/11/26.// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.//#import @interface UIAlertView (ProgressHUD)原创 2012-11-26 18:05:22 · 668 阅读 · 0 评论 -
如何去掉grouped样式UITableView中cell的边框和背景
http://blog.blankyao.com/story/uitableview-cell-background-border.htmlUITableView是iOS开发中最常用的元素,在平常用的iPhone App中大部分都用到了UITableView,所以你应该知道她的强大了。由于刚开始做iOS的项目,遇到问题比较多,在这里记录一下。需求很简单,就是在一个UITab转载 2013-03-21 10:10:32 · 1298 阅读 · 0 评论 -
ViewController的生命周期分析和使用
http://xcodev.com/341.htmliOS的SDK中提供很多原生ViewController,大大提高了我们的开发效率,下面是我的一些经验。一、结构按结构可以对iOS的所有ViewController分成两类:1、主要用于展示内容的ViewController,这种ViewController主要用于为用户展示内容,并与用户交互,如UITableView转载 2013-03-21 10:03:14 · 781 阅读 · 0 评论 -
iPhone图片拉伸:resizableImageWithCapInsets
http://blog.csdn.net/lixing333/article/details/7589281今天做了一个温度计的应用,需要一个图,能够根据输入的数据将温度计里面的红色图片拉伸。为了达到这个效果,使用了iOS5的函数:resizableImageCapInsets:(UIEdgeInsets)Insets。其中Insets这个参数的格式是(top,转载 2013-05-09 15:21:17 · 799 阅读 · 0 评论 -
UIButton上使用UIEdgeInsetsMaketitle跟图片对齐
http://blog.csdn.net/yanxiaoqing/article/details/7230660默认情况下,不设置的效果,都使居中现实,button为150*150使用以下设置后: [self setTitleEdgeInsets:UIEdgeInsetsMake( 0.0,-backGroundImag.size.widt转载 2013-05-09 16:48:12 · 742 阅读 · 0 评论 -
通过自定义的URL Scheme启动你的App
http://blog.csdn.net/ba_jie/article/details/6884818iPhone SDK可以把你的App和一个自定义的URL Scheme绑定。该URL Scheme可用来从浏览器或别的App启动你的App。如何响应从别的App里发给你的URL Scheme申请,由你决定:可以唤醒你的App;也可以传一些信息给你。给自己的App注册一个转载 2013-05-28 09:41:46 · 923 阅读 · 0 评论 -
iOS SDK: Previewing and Opening Documents
http://mobile.tutsplus.com/tutorials/iphone/previewing-and-opening-documents-with-uidocumentinteractioncontroller/Sandboxing on iOS makes the platform much more secure and this ultimately be转载 2013-05-28 09:52:01 · 1215 阅读 · 0 评论 -
UITableview not visible the last cell when scroll down
http://stackoverflow.com/questions/11928085/uitableview-not-visible-the-last-cell-when-scroll-downUse -tableView.contentInset = UIEdgeInsetsMake(0, 0, 120, 0); //values passed are - to转载 2013-08-09 11:45:09 · 1069 阅读 · 0 评论 -
UIView你知道多少
http://www.cnblogs.com/likwo/archive/2011/06/18/2084192.html 曾经有人这么说过,在iphone里你看到的,摸到的,都是UIView,所以UIView在iphone开发里具有非常重要的作用。那么UIView我们到底知道多少呢。请看看下面的问题,如果这些你都知道,那么本文章的内容就请绕道,如果你还不太清楚,我想看了下面的内转载 2013-08-14 12:04:46 · 636 阅读 · 0 评论 -
javascript如何调用objective-c的方法
如题~想要实现 javascript与objc的交互如何实现javascript调用objc内部的某一个接口呢?我是这样实现的例如某一入口js里面function testClick(cmd,parameter1,parameter2){ alert(1); document.write(Date()); window.转载 2013-08-16 15:03:21 · 845 阅读 · 0 评论 -
得到UIView中某个非子视图在UIView中的位置
http://blog.sina.com.cn/s/blog_8764c3140100xfo7.html使用 convertRect: fromView: 或者 convertRect: toView:例如一个视图控制器的view中有一个UITableView,UITableView的某个cell中有个UITextField,想要得到UITextField在view中的位置,就要靠转载 2014-02-13 14:25:30 · 656 阅读 · 0 评论 -
Finding Path/Route Between two points on MapKit in iPhone
http://tricksni.blogspot.com/2012/12/finding-pathroute-between-two-points-on.htmlBelow is the code to finds path & draws line between two locations.To implement below class:_mapRecord转载 2014-03-03 15:39:58 · 1157 阅读 · 0 评论 -
iOS7中的status Bar问题
http://nsdifficult.com/blog/20131015/ios7statusbarproblem/首先推荐这篇文章:Redesign Your App for iOS 7 之 页面布局在iOS7中状态栏默认透明,且视图默认全屏。在实际开发中发现当直接在一个UIVIewController中添加一个UITableview时会发生table中内转载 2014-03-06 12:43:50 · 1396 阅读 · 0 评论 -
Should IBOutlets be strong or weak under ARC?
http://stackoverflow.com/questions/7678469/should-iboutlets-be-strong-or-weak-under-arcFrom a practical perspective, in iOS and OS X outlets should be defined as declared properties. Outlets sho转载 2014-03-06 16:55:38 · 776 阅读 · 0 评论 -
iOS7 table view embedded in tab bar doesn't display last cell
http://stackoverflow.com/questions/19032458/ios7-table-view-embedded-in-tab-bar-doesnt-display-last-cellIn my storyboard, I have a View controller (embedded in a navigation controller). Insi转载 2014-03-14 13:53:39 · 723 阅读 · 0 评论 -
iPhone开发基础教程笔记(十三)--第十三章 轻击、触摸和手势
第十三章 轻击、触摸和手势13.1 多触摸术语“手势”(gesture)是指从你用一个或多个手指接触屏幕时开始,直到你的手指离开屏幕为止所发生的所有事件。手势在事件中传递到系统。事件将在用户与iPhone的多触摸屏幕交互时生成,其中包含一个或多个触摸的信息“触摸”(touch)是指手指放到iPhone的屏幕上。手势中涉及的触摸数量等于同时位于屏幕上 的手指数量。实际上,你可以将转载 2014-06-30 17:45:54 · 802 阅读 · 0 评论 -
sizeThatFits and sizeToFit
http://liuxing8807.blog.163.com/blog/static/9703530520134381526554/sizeThatFits and sizeToFit是UIView的两个方法, 官方文档上说: - (CGSize)sizeThatFits:(CGSize)size; 作用:return 'best' size to fit given s转载 2014-05-30 16:55:35 · 1786 阅读 · 0 评论 -
(iPhone/iPad)代码调用“设置”中的定位服务And系统其他相关功能设置
http://blog.csdn.net/andypan1314/article/details/7218026在安装后第一次运行软件时,系统会弹出提示用户是否允许软件获取当前位置,如果用户不允许的话,之后运行时系统不会在弹出提示设置,这点很不方便,有个解决办法是给用户一个选项,调出iphone中“设置”定位服务选项,由用户手动设置,调用系统“设置”中定位服务相关代码如下:转载 2013-03-11 18:03:30 · 937 阅读 · 0 评论 -
UIAppearance Proxy Protocol Tutorial/Example
http://www.ioslearner.com/uiappearance-proxy-protocol-tutorial/I really used to find it painstaking to customize the UI of any app according to its theme, prior to iOS 5. But with the UIAppe转载 2013-01-19 22:46:58 · 1486 阅读 · 0 评论 -
UITableView Example Code
#import typedef enum _ACTION_TYPE{ TYPE_NONE, TYPE_REMOVE, TYPE_ADD, TYPE_SELECT, TYPE_MOVE}ActionType;@interface ViewController : UIViewController{ UITableView *原创 2012-11-13 18:26:19 · 869 阅读 · 0 评论 -
Hide currently present keyboard
// sends the resign as first responder to the "broadcast" application // this should hide the currently present keyboard [[UIApplication sharedApplication] sendAction:@selector(resignFirst转载 2012-11-15 09:41:27 · 653 阅读 · 0 评论 -
UITableView: Display and hide cells as a dropdown list
http://gabriel-tips.blogspot.com/2011/10/uitableview-display-and-hide-cells-as.htmlWhen creating iOS applications, the need to pick a value from a list while displaying an UITableView comes up q转载 2012-11-15 11:41:00 · 1129 阅读 · 0 评论 -
MPMoviePlayerController
// The current playback time of the now playing item in seconds.@property(nonatomic) NSTimeInterval currentPlaybackTime;当前时间// The duration of the movie, or 0.0 if not known.@property(nonatomic,转载 2012-11-26 10:16:52 · 1155 阅读 · 0 评论 -
关闭keyboard
1, [[[UIApplication sharedApplication] keyWindow] endEditing:YES];2,[TextField resignFirstResponder].原创 2012-12-24 10:50:47 · 638 阅读 · 0 评论 -
iPad、iPhone 界面设计标准
来源:UI设计网转载 2012-12-24 18:32:45 · 724 阅读 · 0 评论 -
How can I flip a UIImageView?
http://stackoverflow.com/questions/1194752/how-can-i-flip-a-uiimageview#import ...- (UIImage *) flipImageVertically:(UIImage *)originalImage direction:(NSString *)axis {UIImageView *tempI转载 2012-12-26 22:15:13 · 733 阅读 · 0 评论 -
应用中弹出 WiFi 提示框的方法
http://www.cocoachina.com/iphonedev/sdk/2011/0513/2851.html如果 iOS 程序中用到了 WiFi,想有 WiFi 提示,只需要在 .plist 文件中加入如下 Key/Value 即可: 键名:ApplicationusesWi-Fi 值:YES 键名:SBUsesNetwork 值:3 示例代码:点击 此处下载。转载 2012-12-28 18:23:25 · 1125 阅读 · 0 评论 -
合并音视频
内容:http://www.raywenderlich.com/13418/how-to-play-record-edit-videos-in-ios?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+RayWenderlich+(Ray+Wenderlich+|+iPhone+Developer+and+Gamer)转载 2012-12-29 18:16:54 · 1877 阅读 · 1 评论 -
几个经常需要自定义的组件:UIScrollview、UItextView、UIButton
http://blog.csdn.net/yanxiaoqing/article/details/7108920为了独立出组件的一些功能,如,为UIbutton切换背景图片,我们经常需要自定义一些组件,下面是我经常用到的,先总结出来,以后会慢慢更新:-:UIScroviewsrollview的事件经常与其子view事件冲突,截断子view事件的相应//传转载 2012-12-19 10:22:32 · 520 阅读 · 0 评论 -
Objective-c 中CGGeometry几何类常用方法简单整理
http://www.cnblogs.com/xuling/archive/2012/02/09/2343427.htmlCGGeometryCGGeometry参考定义几何结构和功能,操作简单。数据结构中的一个点CGPoint代表在一个二维坐标系统。数据结构的位置和尺寸CGRect代表的一个长方形。数据结构的尺寸CGSize代表宽度和高度。1、创建一个几何原始数值转载 2012-12-20 11:20:48 · 437 阅读 · 0 评论 -
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)anima
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animationReloading a row causes the table view to ask its data source for a new cell for that row原创 2012-12-21 18:48:52 · 2239 阅读 · 0 评论 -
让你的APP支持iPhone5
http://blog.devtang.com/blog/2012/10/05/upgrade-your-app-to-support-iphone5/让你的APP支持iPhone5OCT 5TH, 2012前言国庆节前,为了支持iPhone5的屏幕分辨率(640象素 x 1136象素),我尝试着升级粉笔网iPhone客户端。整个过程花了大概一天的时间,我把转载 2013-01-10 12:11:00 · 620 阅读 · 0 评论 -
How To Customize The Tab Bar Using iOS 5 Appearance API
http://ios-blog.co.uk/tutorials/how-to-customize-the-tab-bar-using-ios-5-appearance-api/Great App design is now a must-have when developing apps for the App Store. Especially, now that you have转载 2013-01-14 11:29:49 · 701 阅读 · 0 评论 -
iPhone iPad 各种控件默认高度
http://www.cnblogs.com/zhwl/archive/2013/01/08/2850538.html1.状态栏状态栏一般高度为20像素,在打手机或者显示消息时会放大到40像素高,注意,两倍高度的状态栏在好像只能在纵向的模式下使用。如下图用户可以隐藏状态栏,也可以将状态栏设置为灰色,黑色或者半透明的黑色。 如果需要隐藏状态转载 2013-01-15 10:33:00 · 477 阅读 · 0 评论 -
ios6.0以前版本开发 异常信息:reason: ‘Could not instantiate class named NSLayoutConstraint’
ios6版本出来新特性:auto layout属性,此属性只针对ios6及以上版本; ios6以下版本运行时出现异常信息:Terminating app due to uncaught exception ‘NSInvalidUnarchiveOperationException’, reason: ‘ Could not instantiate class named NSLayoutC转载 2013-01-19 20:44:12 · 665 阅读 · 0 评论 -
ALAssetsGroup failed to add asset: 错误 IOS8
IOS8删除相册后,在写入到同名相册会产生下面这样的错误Error Domain=LIB_ALAssetsLibrary_CustomPhotoAlbum Code=0 "ALAssetsGroup failed to add asset: ALAsset - Type:Photo, URLs:assets-library://asset/asset.PNG?id=34FFE0D1-08B原创 2015-02-04 15:22:06 · 2530 阅读 · 0 评论