摘要: shuo.mohemi.com以后将会在那里继续~ 阅读全文
posted @ 2015-05-07 15:34 墨禾米说 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1. Auto property synthesis will not synthesize property 'title'; it will be implemented by its superclass, use @dynamic to acknowledge intention 这是说编... 阅读全文
posted @ 2015-04-10 14:03 墨禾米说 阅读(11129) 评论(0) 推荐(0) 编辑
摘要: GIT忽略iOS项目UserInterfaceState.xcuserstate1.删除仓库中跟踪的UserInterfaceState.xcuserstate git rm --cached iamhere/IAmHere.xcodeproj/project.xcworkspace/xcuser... 阅读全文
posted @ 2015-04-07 17:25 墨禾米说 阅读(368) 评论(0) 推荐(0) 编辑
摘要: update wp_users set user_pass=md5("123456") where user_login='帐号'; 阅读全文
posted @ 2015-01-29 08:34 墨禾米说 阅读(176) 评论(0) 推荐(0) 编辑
摘要: [self.navigationController.navigationBar setShadowImage:[Static ColorToImage:[Static colorWithHexString:[UIColor red]]]];Static 里的几个静态方法+ (UIImage *)C... 阅读全文
posted @ 2015-01-16 16:54 墨禾米说 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 传统的设置if (IOSVERSION >= 7) { [[UINavigationBar appearance] setBarTintColor:[UIColor redColor]];} else { [[UINavigationBar appearance] setBarTi... 阅读全文
posted @ 2015-01-15 15:17 墨禾米说 阅读(311) 评论(0) 推荐(0) 编辑
摘要: Mac 是默认安装 apache和php,但是需要使用root用户来启用,所以请按照我下面的步骤来:一、启用root用户1、选取系统偏好设置...。2、从显示菜单中,选取“帐户”。3、点按锁图标并使用管理员帐户进入。4、点击“登录选项”。5、点按右下方的“加入”按钮。6、点击“打开目录实用工具”按钮... 阅读全文
posted @ 2014-11-24 15:45 墨禾米说 阅读(472) 评论(0) 推荐(0) 编辑
摘要: 遇到如下的问题平时都没太注意创建UIViewController的时候Xcode给你引入的类库,所以解决方法是:在.h里#import 解决问题! 阅读全文
posted @ 2014-11-24 11:26 墨禾米说 阅读(1046) 评论(0) 推荐(0) 编辑
摘要: 在没有分割先的情况下,添加如下方法,当实例化tableview的时候调用该方法.- (void)setExtraCellLineHidden: (UITableView*)tableView{UIView*view =[ [UIView alloc]init];view.backgroundColo... 阅读全文
posted @ 2014-11-19 11:26 墨禾米说 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 一. ln分为硬链接和软链接.二. 硬链接命令为: ln test/a.text hard.text 1. 这样hard.text拥有 test目录下a.text相同的i节点(inode的id号)和Block块(文件在硬盘分区的存储区域),有一点点像对i节点和Block进行了深拷贝; 2. 对a.t... 阅读全文
posted @ 2014-11-03 16:28 墨禾米说 阅读(1789) 评论(0) 推荐(0) 编辑
摘要: 一: 用户目录下建立一个脚本“.bash_profile”,并输入以下内容即可:alias ll='ls -alF'alias la='ls -A'alias l='ls -CF'二: source .bash_profile搞定! 阅读全文
posted @ 2014-11-03 16:02 墨禾米说 阅读(221) 评论(0) 推荐(0) 编辑
摘要: NSArray里有sortedArrayUsingSelector:等排序的方法,但是最简单的倒序排列的方法如下:NSArray *deArray = [[keyArrays reverseObjectEnumerator] allObjects]; 阅读全文
posted @ 2014-10-30 20:27 墨禾米说 阅读(439) 评论(0) 推荐(0) 编辑
摘要: 手贱升级到了Xcode6.结果一打开来就爆了各种错误换个警告; 各种百度和谷歌,终于搞定了,然后插上4S,结果还是报错. 解决:1.找到Build Settings2.点击Architectures3. 添加$(ARCHS_STANDARD_32_BIT) 阅读全文
posted @ 2014-09-26 15:22 墨禾米说 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 原文地址:IOS6屏幕旋转详解(自动旋转、手动旋转、兼容IOS6之前系统)作者:wzyfly在iOS6之前的版本中,通常使用shouldAutorotateToInterfaceOrientation来单独控制某个UIViewController的方向,需要哪个viewController支持旋转,... 阅读全文
posted @ 2014-07-18 18:13 墨禾米说 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 项目-targets-build phases,然后从copy bundle resources里面删掉红色的错误资源文件 阅读全文
posted @ 2014-07-14 11:36 墨禾米说 阅读(195) 评论(0) 推荐(0) 编辑
摘要: //didFinishLaunchingWithOptions 方法:顾名思义。在app开始运行时会调用里面的方法。- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary... 阅读全文
posted @ 2014-07-04 13:51 墨禾米说 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 加载过程加载第一步- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil //根据nib文件实例化UIViewController// 这个方法是在controller的类在IB中创建,但是通过... 阅读全文
posted @ 2014-07-04 13:48 墨禾米说 阅读(593) 评论(0) 推荐(0) 编辑
摘要: //利用CATransition来作模拟//模拟Push- (void)pushView:(UIView *)pushView inView:(UIView *)inView{ CATransition *animation = [CATransition animation]; ani... 阅读全文
posted @ 2014-06-26 16:18 墨禾米说 阅读(317) 评论(0) 推荐(0) 编辑
摘要: [_handoutButton setImage: [UIImage imageNamed:IMG_PUBLIC_VideoView_Handout] forState:UIControlStateNormal];[_handoutButton setImage: [UIImage imageNam... 阅读全文
posted @ 2014-06-24 15:51 墨禾米说 阅读(296) 评论(0) 推荐(0) 编辑
摘要: ios7以下的版本设置导航栏背景颜色可以使用[[UINavigationBar appearance] setTintColor:[UIColor orangeColor]];ios7以后:[[UINavigationBar appearance] setBarTintColor:[UIColor ... 阅读全文
posted @ 2014-06-21 13:50 墨禾米说 阅读(532) 评论(0) 推荐(0) 编辑
摘要: IOS在Cell上的优化令人觉得底层框架的成熟,可是有些情形却会造成不必要的麻烦,当使用了 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:Identifier];有可能会造成画面重复的问题,此句的意思是,... 阅读全文
posted @ 2014-06-18 16:45 墨禾米说 阅读(357) 评论(0) 推荐(0) 编辑
摘要: if (indexPath.row %2 ==1){ cell.backgroundColor = [UIColor colorWithRed:.7 green:.7 blue:.7 alpha:1]; } else{ ... 阅读全文
posted @ 2014-06-17 14:07 墨禾米说 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 由于NSUserDefaults 不支持保存自定类,保存的对象需要实现NSCoding协议,不过自定的类型就算实现了NSCoding也不可以保存,可以通过以下方法实现://h文件#import @interface People : NSObject@property(nonatomic,copy)... 阅读全文
posted @ 2014-06-12 20:24 墨禾米说 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 百度云下载http://pan.baidu.com/s/1qWpuIC0提取码:ip9o苹果下载:http://adcdownload.apple.com//wwdc_2014/xcode_6_beta_ie8g3n/xcode_6_beta.dmg转自:http://1.becks.sinaapp... 阅读全文
posted @ 2014-06-05 10:18 墨禾米说 阅读(301) 评论(0) 推荐(0) 编辑
摘要: [iOS] Error Fixed : [__NSArrayI addObject:]: unrecognized selector sent to instance当我创建了一个NSMutableArray 对象的时候@property(nonatomic,copy)NSMutableArray*... 阅读全文
posted @ 2014-06-04 11:21 墨禾米说 阅读(831) 评论(0) 推荐(0) 编辑
摘要: + (UIColor *) colorWithHexString: (NSString *)color{ NSString *cString = [[color stringByTrimmingCharactersInSet:[NSCharacterSetwhitespaceAndNewlineC... 阅读全文
posted @ 2014-05-22 15:05 墨禾米说 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 当update的时候遇到如下问题 svn status D C ~/workspace/test/a.c > local unversioned, incoming add upon update Summary of conflicts: Tree conflicts:1用如... 阅读全文
posted @ 2014-05-21 16:31 墨禾米说 阅读(1319) 评论(0) 推荐(0) 编辑
摘要: 利用 NSSetUncaughtExceptionHandler,当程序异常退出的时候,就给指定的邮箱发送邮件,邮件内容包括发生异常时候的详情。代码如下:void UncaughtExceptionHandler(NSException *exception) {NSArray *arr = [ex... 阅读全文
posted @ 2014-04-28 11:19 墨禾米说 阅读(197) 评论(0) 推荐(0) 编辑
摘要: [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:YES]; 阅读全文
posted @ 2014-04-22 17:30 墨禾米说 阅读(515) 评论(0) 推荐(0) 编辑
摘要: 推荐一篇博文http://onevcat.com/2013/12/code-vs-xib-vs-storyboard/ 阅读全文
posted @ 2014-04-06 09:59 墨禾米说 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 遇到这样的问题: integer to pointer conversion assigning to 'NSInteger *' (aka 'int *') from 'NSInteger' (aka 'int')用[NSNumber numberWithInteger:id]转换.即可. 阅读全文
posted @ 2014-04-04 13:15 墨禾米说 阅读(10928) 评论(0) 推荐(1) 编辑
摘要: 推荐一篇神作:通过实现一个TableView来理解iOS UI编程http://blog.jobbole.com/61101/ 阅读全文
posted @ 2014-04-03 21:26 墨禾米说 阅读(216) 评论(0) 推荐(0) 编辑
摘要: -(void) tapClick:(UITapGestureRecognizer *)tap{ [UIViewbeginAnimations:@"exitApplication"context:nil]; [UIViewsetAnimationDuration:0.5]; [UIViewsetAnimationDelegate:self]; [UIViewsetAnimationTransition:UIViewAnimationCurveEaseOutforView:self.view.windowcache:NO]; [UIView setAnimation... 阅读全文
posted @ 2014-03-27 11:13 墨禾米说 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 下面举个简单的例子来说明在iOS7.0和iOS6.1(以及更低版本)之间的适配问题(用的是xcode5.0,里边有6.1和7.0两个版本的sdk)新建一个工程,默认的development target,base sdk以及模拟器的版本都是7.0,在AppDelegate中的didFinishLaunchingWithOptions方法里写 self.window.tintColor=[UIColorredColor]; 然后运行,这样是没有任何错误的。接下来将development target,base sdk以及模拟器的版本都改成6.1(注意默认的xcode是没有6.1的sdk的,需要. 阅读全文
posted @ 2014-03-27 11:11 墨禾米说 阅读(267) 评论(0) 推荐(0) 编辑
摘要: UISearchBar 详解最近用到搜索功能。于是,经过不断的研究,终于,有点懂了。那就来总结一下吧,好记性不如烂笔头!搜索,无疑可以使用UISearchBar控件!那就先了解一下UISearchBar控件吧!UISearchBar控件就是要为你完成搜索功能的一个专用控件。它集成了很多你意想不到的功能和特点!首先,还是来普及一下UISearchBar控件API相关的属性和方法吧!UISearchBar属性相关_searchBar= [[UISearchBaralloc]initWithFrame:CGRectZero];//初始化,不解释[self.searchBarsetPlaceholde 阅读全文
posted @ 2014-03-11 20:32 墨禾米说 阅读(468) 评论(0) 推荐(1) 编辑
摘要: 在UITextView里没有UITextField里的- (BOOL)textFieldShouldReturn:(UITextField *)textField;直接的响应事件;那么在TextView里呢用: - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text; { if ([@"\n" isEqualToString:text] == YES) { [_feedBackTextView ... 阅读全文
posted @ 2014-03-09 19:40 墨禾米说 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 有时一个UILable的text内容是变化的,而且差异有很大,需求上要求UILabel的大小高宽能够自适应text的内容。代码例子:myLable=[[UILabelalloc]initWithFrame:CGRectMake(0,23,175,33)];[myLablesetFont:[UIFontfontWithName:@"Helvetica"size:10.0]];[myLablesetNumberOfLines:0];[myLablesetBackgroundColor:[UIColorclearColor]];[myAdViewaddSubview:myLabl 阅读全文
posted @ 2014-03-07 15:54 墨禾米说 阅读(364) 评论(0) 推荐(0) 编辑
摘要: self.edgesForExtendedLayout = UIRectEdgeNone;就这么简单! 阅读全文
posted @ 2014-03-06 19:46 墨禾米说 阅读(537) 评论(0) 推荐(0) 编辑
摘要: setMasksToBounds在IB中,当你使用Custom类型的Button时,你可以指定按钮的背景色。但当你运行时按钮就失去了圆角特性,你看到的仅仅是一个方块。因为custombutton没有定义任何属性默认值。你必须自己去定义它们,这就需要使用Core Animation Layer。提示:编写代码之前,需要导入QuartzCore框架到工程中,然后#import。我会通常会把它放在.pch文件中。IB没有干的事情,你只能通过代码来做。例如,如果你想做一个圆角且红色背景的按钮,你需要将按钮链接到你的viewcontroller的出口中,然后在Xcode中通过它的layer属性修改按钮的 阅读全文
posted @ 2014-03-04 11:21 墨禾米说 阅读(478) 评论(0) 推荐(0) 编辑
摘要: 1 1.UITextField的初始化和设置 2 textField = [[UITextField alloc] initWithFrame:CGRectMake(120.0f, 80.0f, 150.0f, 30.0f)]; 3 [textField setBorderStyle:UITextBorderStyleRoundedRect]; //外框类型 4 5 textField.placeholder = @"password"; //默认显示的字 6 7 textField.secureTextEntry = YES; //密码 8 ... 阅读全文
posted @ 2014-03-02 19:51 墨禾米说 阅读(371) 评论(0) 推荐(0) 编辑