ios5

关于 IOS5 使用 position:fixed 与 scrollTo 共存的 bug

六眼飞鱼酱① 提交于 2020-04-22 05:21:07
这两天帮某个项目处理后事,本以为可以轻松搞定,不成想又发现了一个bug..... 背景描述: ios5 提出了支持 position:fixed ,于是乎大家觉得让浮动的图层固定在屏幕最下方容易多了,赶紧用上吧。可是呢。。。页面上又有好多地方需要用到 scrollTo 控制滚动条移动,尤其是页面刚加载完毕需要让浏览器默认的 url 栏消失,一般都用 scrollTo(0,0) 或 scrollTo(0,1) 之类的。。。当这两者混合时就出现问题了, 浮动的div 虽然是你看到的在最下方,但是实际上这个div 内的触控点全都漂移了。 (画外音:通过这件事情,我们明白了一个道理:不能只相信你的眼睛....) 用 iphone 访问地址: http://ztree.me/issueTest/iosFixed.html (注意,此 bug 在 iphone5上不存在!应该是 ios6 系统修正了这个bug。 ) 你就可以重现上图的问题,看触屏的位置,那里没有任何内容,但是点击后会看到灰色阴影,点击后 alert 44,这说明 click 44 这个 li 的位置实际上漂移到了那里。 bug 描述: 通过这个 Demo 可以基本确定 bug 的原因——利用 scrollTo 滚屏时,会导致 position:fixed 的图层视图不变,但对应的 DOM 实际响应位置却跟随 滚动条一起移动了

fetchRequestFromTemplateWithName variables

早过忘川 提交于 2020-03-20 18:20:52
问题 I'm using Xcode 4.2.1 and trying to use a variable. I understand in xcode 4 you need to set the variable with $variable . I have in Xcode for my fetch request the variable as $currDate and my code as NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"YYYYMMdd"]; NSDate *currDate = [NSDate date]; NSString *currDateString = [dateFormatter stringFromDate:currDate]; NSError *error; NSFetchRequest *fetchRequest = [[[DataManager sharedInstance]

fetchRequestFromTemplateWithName variables

折月煮酒 提交于 2020-03-20 18:18:06
问题 I'm using Xcode 4.2.1 and trying to use a variable. I understand in xcode 4 you need to set the variable with $variable . I have in Xcode for my fetch request the variable as $currDate and my code as NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"YYYYMMdd"]; NSDate *currDate = [NSDate date]; NSString *currDateString = [dateFormatter stringFromDate:currDate]; NSError *error; NSFetchRequest *fetchRequest = [[[DataManager sharedInstance]

fetchRequestFromTemplateWithName variables

▼魔方 西西 提交于 2020-03-20 18:15:27
问题 I'm using Xcode 4.2.1 and trying to use a variable. I understand in xcode 4 you need to set the variable with $variable . I have in Xcode for my fetch request the variable as $currDate and my code as NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"YYYYMMdd"]; NSDate *currDate = [NSDate date]; NSString *currDateString = [dateFormatter stringFromDate:currDate]; NSError *error; NSFetchRequest *fetchRequest = [[[DataManager sharedInstance]

fetchRequestFromTemplateWithName variables

为君一笑 提交于 2020-03-20 18:12:43
问题 I'm using Xcode 4.2.1 and trying to use a variable. I understand in xcode 4 you need to set the variable with $variable . I have in Xcode for my fetch request the variable as $currDate and my code as NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"YYYYMMdd"]; NSDate *currDate = [NSDate date]; NSString *currDateString = [dateFormatter stringFromDate:currDate]; NSError *error; NSFetchRequest *fetchRequest = [[[DataManager sharedInstance]

fetchRequestFromTemplateWithName variables

╄→гoц情女王★ 提交于 2020-03-20 18:12:19
问题 I'm using Xcode 4.2.1 and trying to use a variable. I understand in xcode 4 you need to set the variable with $variable . I have in Xcode for my fetch request the variable as $currDate and my code as NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"YYYYMMdd"]; NSDate *currDate = [NSDate date]; NSString *currDateString = [dateFormatter stringFromDate:currDate]; NSError *error; NSFetchRequest *fetchRequest = [[[DataManager sharedInstance]

Method calling via performSelectorOnMainThread Vs Normal method calling

こ雲淡風輕ζ 提交于 2020-02-24 07:44:36
问题 can any one tell me what is different when I call method using performSelectorOnMainThread and calling same method without performSelector. For Exa. -(void)sampleCALL{ .......... } NOW Call this method using these two senario: [[self performSelectorOnMainThread:@selector(sampleCALL) withObject:nil waitUntilDone:NO];]; or [self sampleCALL]; How these two method are getting executed? Please help me to find this concept properly. 回答1: in firs one case [self sampleCALL]; your method will be