10 2013 档案

摘要:CGSize mSize = [info.nicksizeWithFont:[UIFontsystemFontOfSize:13.0f] constrainedToSize:CGSizeMake(MAXFLOAT, self.nickLabel.frame.size.height)]; 阅读全文
posted @ 2013-10-31 14:46 路在脚下, 阅读(151) 评论(0) 推荐(0) 编辑
摘要:- (void)drawRect:(CGRect)rect{ CGContextRef context = UIGraphicsGetCurrentContext(); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGFloat locations[] = {0.0, 1.0};// 蓝色// NSArray* colors = [NSArray arrayWithObjects:(__bridge id)RGBCOLOR(4, 135, 243).CGColor, (__bridge id)RGBCOLOR... 阅读全文
posted @ 2013-10-30 18:45 路在脚下, 阅读(146) 评论(0) 推荐(0) 编辑
摘要://// CommonUserMenu.m// Zhaocailing//// Created by zhaocailing on 13-10-17.// Copyright (c) 2013年 totem. All rights reserved.//#import "CommonUserMenu.h"#import "Constant.h"#import "DataModel.h"@implementation CommonUserMenu- (id)initWithFrame:(CGRect)frame{ self = [sup 阅读全文
posted @ 2013-10-30 11:33 路在脚下, 阅读(174) 评论(0) 推荐(0) 编辑
摘要:对于 push,pop,都会调用 controller的 viewwillappear,只是 后者 直接 把controller给丢弃了,前者还被维护着,就像那个 买会员一样,走 支付流程,一直push,一直push,contrller是没有被释放掉的,因此当 发送通知的时候,只要 contrller注册通知了,并且 没有被移除掉,那么一切就ok,有时候 会在 viewwilldisappear里 写释放资源的代码,那是为了push的情况, 阅读全文
posted @ 2013-10-29 10:10 路在脚下, 阅读(202) 评论(0) 推荐(0) 编辑
摘要:- (void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; if (SharedAppDelegate.userInfo) { self.userMenu.gender = SharedAppDelegate.userInfo.gender; self.userMenu.dotImageView.hidden = !SharedAppDelegate.hasNewMsg; self.beatTimer = [NSTimerscheduledTimerWithTimeInterval:kBe... 阅读全文
posted @ 2013-10-28 14:28 路在脚下, 阅读(161) 评论(0) 推荐(0) 编辑
摘要:#define kReceiveCoinTime [NSString stringWithFormat:@"receiveCoinTime%d", SharedAppDelegate.userInfo.userID], 阅读全文
posted @ 2013-10-26 12:15 路在脚下, 阅读(129) 评论(0) 推荐(0) 编辑
摘要://点击(button)领取的时间,-(void)receiveCoin{ self.coinStateLabel.text = @"招财币已领取"; self.coinBtn.userInteractionEnabled = NO; NSDate *now = [NSDate new]; unsigned units = NSMonthCalendarUnit|NSDayCalendarUnit|NSYearCalendarUnit; NSCalendar *mCal = [[NSCalendaralloc] initWithCalendarIdentifier:NSGr 阅读全文
posted @ 2013-10-26 11:38 路在脚下, 阅读(246) 评论(0) 推荐(0) 编辑
摘要:1,cellforrow2,numberofrow3,heightforrow4,didselectrow, 阅读全文
posted @ 2013-10-26 11:37 路在脚下, 阅读(125) 评论(0) 推荐(0) 编辑
摘要:1,数据源错了,-(void)adjustProvinceCityFormatByCityId:(int)cId andProvinceId:(int)pId{// 找到省份包含的所有城市 self.cityArray = [selfcityArrayByProvinCode:pId];// 定位具体城市 for (int i = 0;i < self.cityArray.count; i++) { CommonDistrctInfo *info = [self.cityArrayobjectAtIndex:i]; if (cId == info.idNumber) { ... 阅读全文
posted @ 2013-10-26 11:33 路在脚下, 阅读(188) 评论(0) 推荐(0) 编辑
摘要:-(void)receiveTodayCoin{ NSDate *now = [NSDate new]; unsigned units = NSMonthCalendarUnit|NSDayCalendarUnit|NSYearCalendarUnit; NSCalendar *mCal = [[NSCalendaralloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDateComponents *mComp = [mCal components:units fromDate:now]; NSDateComponents... 阅读全文
posted @ 2013-10-23 17:10 路在脚下, 阅读(151) 评论(0) 推荐(0) 编辑
摘要:uibutton = uiimgeiview + uilabel 阅读全文
posted @ 2013-10-23 13:31 路在脚下, 阅读(158) 评论(0) 推荐(0) 编辑
摘要:1,还可以发说说,2,其他人都没法看了,以 未开通的名义3,网页上没法访问主页了,4,无法交互了,以蛋疼的名义, 阅读全文
posted @ 2013-10-21 14:27 路在脚下, 阅读(145) 评论(0) 推荐(0) 编辑
摘要:view是不能 做owner的, 阅读全文
posted @ 2013-10-21 10:53 路在脚下, 阅读(124) 评论(0) 推荐(0) 编辑
摘要:色差,字体大小 与 背景,方法:copy完全一样的进行对比,不行了,删除重新写, 阅读全文
posted @ 2013-10-18 15:27 路在脚下, 阅读(156) 评论(0) 推荐(0) 编辑
摘要:imageview + label + label1+ imageview2 阅读全文
posted @ 2013-10-17 11:21 路在脚下, 阅读(98) 评论(0) 推荐(0) 编辑
摘要:1, 线条的 粗细,2, 背景颜色的 暗明, 阅读全文
posted @ 2013-10-16 15:18 路在脚下, 阅读(121) 评论(0) 推荐(0) 编辑
摘要:通过删除 库的引用,再次添加看看,不去build phrase 里面一个一个添加, 阅读全文
posted @ 2013-10-16 10:32 路在脚下, 阅读(240) 评论(0) 推荐(0) 编辑
摘要:[selfperformSelector:@selector(delayAppear) withObject:NilafterDelay:0.1f]; 阅读全文
posted @ 2013-10-15 17:02 路在脚下, 阅读(360) 评论(0) 推荐(0) 编辑
摘要:当 cell 滑出 tableview的边界时,cell是一定会被 回收的,至于当 cell再次 呈现在 tableview的 范围 内的时候, 从哪里 获得 cell 有三种途径:1,新建,2,从系统 维护的队列中找,3,从 自己维护的 cell 数组 里面获取, 阅读全文
posted @ 2013-10-14 17:49 路在脚下, 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-10-14 15:55 路在脚下, 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-10-14 15:05 路在脚下, 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-10-14 11:10 路在脚下, 阅读(134) 评论(0) 推荐(0) 编辑
摘要:if (SharedAppDelegate.userInfo.userID == focusFansInfo.idNumber) { HomeViewController *controller; for (NSObject *obj inself.navigationController.viewControllers) { if ([obj isKindOfClass:[HomeViewController class]]) { controller = (HomeViewController *)obj; [self.navigation... 阅读全文
posted @ 2013-10-12 18:22 路在脚下, 阅读(157) 评论(0) 推荐(0) 编辑
摘要://监听字数变化- (IBAction)editingChange:(UITextField *)textField{ NSString *nickName; switch (textField.tag) { case 10: { if (textField.markedTextRange) { break; } nickName = [textField.textstringByTrimmingCharactersInSet:[NSCharacterSetwhitespaceAndNewlineCharacterSet]]; ... 阅读全文
posted @ 2013-10-12 16:08 路在脚下, 阅读(1483) 评论(0) 推荐(0) 编辑
摘要:if ( placeHolderLabel == nil ) { placeHolderLabel = [[UILabel alloc] initWithFrame:CGRectMake(8,8,self.bounds.size.width - 16,0)]; placeHolderLabel.lineBreakMode = UILineBreakModeWordWrap; placeHolderLabel.numberOfLines = 0; placeHolderLabel.font = self.font; placeHolderL... 阅读全文
posted @ 2013-10-11 18:07 路在脚下, 阅读(245) 评论(0) 推荐(0) 编辑
摘要:bounds 大 ,左上角,bounds小,局中间, 阅读全文
posted @ 2013-10-11 17:04 路在脚下, 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-10-11 14:14 路在脚下, 阅读(110) 评论(0) 推荐(0) 编辑
摘要:UIScreen(屏幕),UIWindow(窗口),UIView(视图)是IOS的几个基本界面元素。其中UIWindow(窗口)和UIView(视图)是为iPhone应用程序构造用户界面的可视组件。UIWindow为内容显示提供背景平台,UIView负责绝大部分的内容描画,并负责响应用户的交互。1,UIScreenUIScreen类代表了屏幕,根据特酷吧的理解,UIScreen一般也只是用来获取屏幕大小。如下例所示:CGrect screenBounds = [[UIScreen mainScreen] bounds];//返回的是带有状态栏的Rect (0.0,0.0,320.0,480.0 阅读全文
posted @ 2013-10-11 09:47 路在脚下, 阅读(219) 评论(0) 推荐(0) 编辑
摘要:模块:我的主页,2013,10,11:1,适配 ios sdk 7.0,(预计一个上午) be doing方案:第一次 运行 生生的调了 window的 frame orginy = 20,在 baseviewcontroller 里面 相对 CGRect screen = [[UIScreen mainScreen] bounds]; ,调了 navigationcontroller的view的frame,和 普通controller 的view的frame, 都是 下调了20, [self.window.rootViewControllerdismissModalViewControlle 阅读全文
posted @ 2013-10-11 09:02 路在脚下, 阅读(218) 评论(0) 推荐(0) 编辑
摘要:if (!self.userInfo) { [self showLogin:NO]; }else{ [self loadUserInfo];//获取用户信息 } [self.window makeKeyAndVisible]; 阅读全文
posted @ 2013-10-10 15:05 路在脚下, 阅读(124) 评论(0) 推荐(0) 编辑
摘要:window>navigationcontroller>controller,status bar 在window 外面么,1,appdelagate,CGRect windowFrame =self.window.frame; windowFrame.origin.y =20; windowFrame.size.height = windowFrame.size.height -20; self.window.frame = windowFrame;2,@implementation TTBaseViewController//-(void)viewDidLoad//{// [s 阅读全文
posted @ 2013-10-10 12:45 路在脚下, 阅读(263) 评论(0) 推荐(0) 编辑
摘要:虽然用户看来,iOS7默认样式的状态栏和导航栏时连在一起的,但是实际上导航栏的位置和大小是和之前系统版本一样的,依然是贴在状态栏下面,依然是高 44px;之所以用户看来它们是连在一起,这是因为UINavigationBar里面的_UINavigationBarBackground定位在y 方向-20px的位置,然后高度增加到64px,这样就可以同时充当了两者的背景。而变透明之后就很容易和后面的内容混淆,虽说一般应用不会把内容和状态栏叠合在一起,但是至少,现在的情况是,默认是会叠合的,开发需要从20px像素以下开始布局页面元素才能避免。[navCtrl.navigationBar setBack 阅读全文
posted @ 2013-10-09 15:38 路在脚下, 阅读(500) 评论(0) 推荐(0) 编辑