10 2013 档案
摘要:CGSize mSize = [info.nicksizeWithFont:[UIFontsystemFontOfSize:13.0f] constrainedToSize:CGSizeMake(MAXFLOAT, self.nickLabel.frame.size.height)];
阅读全文
摘要:- (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...
阅读全文
摘要://// 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
阅读全文
摘要:对于 push,pop,都会调用 controller的 viewwillappear,只是 后者 直接 把controller给丢弃了,前者还被维护着,就像那个 买会员一样,走 支付流程,一直push,一直push,contrller是没有被释放掉的,因此当 发送通知的时候,只要 contrller注册通知了,并且 没有被移除掉,那么一切就ok,有时候 会在 viewwilldisappear里 写释放资源的代码,那是为了push的情况,
阅读全文
摘要:- (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...
阅读全文
摘要:#define kReceiveCoinTime [NSString stringWithFormat:@"receiveCoinTime%d", SharedAppDelegate.userInfo.userID],
阅读全文
摘要://点击(button)领取的时间,-(void)receiveCoin{ self.coinStateLabel.text = @"招财币已领取"; self.coinBtn.userInteractionEnabled = NO; NSDate *now = [NSDate new]; unsigned units = NSMonthCalendarUnit|NSDayCalendarUnit|NSYearCalendarUnit; NSCalendar *mCal = [[NSCalendaralloc] initWithCalendarIdentifier:NSGr
阅读全文
摘要:1,cellforrow2,numberofrow3,heightforrow4,didselectrow,
阅读全文
摘要: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) { ...
阅读全文
摘要:-(void)receiveTodayCoin{ NSDate *now = [NSDate new]; unsigned units = NSMonthCalendarUnit|NSDayCalendarUnit|NSYearCalendarUnit; NSCalendar *mCal = [[NSCalendaralloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDateComponents *mComp = [mCal components:units fromDate:now]; NSDateComponents...
阅读全文
摘要:1,还可以发说说,2,其他人都没法看了,以 未开通的名义3,网页上没法访问主页了,4,无法交互了,以蛋疼的名义,
阅读全文
摘要:view是不能 做owner的,
阅读全文
摘要:色差,字体大小 与 背景,方法:copy完全一样的进行对比,不行了,删除重新写,
阅读全文
摘要:imageview + label + label1+ imageview2
阅读全文
摘要:通过删除 库的引用,再次添加看看,不去build phrase 里面一个一个添加,
阅读全文
摘要:[selfperformSelector:@selector(delayAppear) withObject:NilafterDelay:0.1f];
阅读全文
摘要:当 cell 滑出 tableview的边界时,cell是一定会被 回收的,至于当 cell再次 呈现在 tableview的 范围 内的时候, 从哪里 获得 cell 有三种途径:1,新建,2,从系统 维护的队列中找,3,从 自己维护的 cell 数组 里面获取,
阅读全文
摘要:if (SharedAppDelegate.userInfo.userID == focusFansInfo.idNumber) { HomeViewController *controller; for (NSObject *obj inself.navigationController.viewControllers) { if ([obj isKindOfClass:[HomeViewController class]]) { controller = (HomeViewController *)obj; [self.navigation...
阅读全文
摘要://监听字数变化- (IBAction)editingChange:(UITextField *)textField{ NSString *nickName; switch (textField.tag) { case 10: { if (textField.markedTextRange) { break; } nickName = [textField.textstringByTrimmingCharactersInSet:[NSCharacterSetwhitespaceAndNewlineCharacterSet]]; ...
阅读全文
摘要: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...
阅读全文
摘要:bounds 大 ,左上角,bounds小,局中间,
阅读全文
摘要: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
阅读全文
摘要:模块:我的主页,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
阅读全文
摘要:if (!self.userInfo) { [self showLogin:NO]; }else{ [self loadUserInfo];//获取用户信息 } [self.window makeKeyAndVisible];
阅读全文
摘要: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
阅读全文
摘要:虽然用户看来,iOS7默认样式的状态栏和导航栏时连在一起的,但是实际上导航栏的位置和大小是和之前系统版本一样的,依然是贴在状态栏下面,依然是高 44px;之所以用户看来它们是连在一起,这是因为UINavigationBar里面的_UINavigationBarBackground定位在y 方向-20px的位置,然后高度增加到64px,这样就可以同时充当了两者的背景。而变透明之后就很容易和后面的内容混淆,虽说一般应用不会把内容和状态栏叠合在一起,但是至少,现在的情况是,默认是会叠合的,开发需要从20px像素以下开始布局页面元素才能避免。[navCtrl.navigationBar setBack
阅读全文