WEB开发网
开发学院手机开发iPhone 开发 iPhone 上实现页面循环滚动 阅读

iPhone 上实现页面循环滚动

 2010-03-10 16:10:00 来源:WEB开发网   
核心提示:{// NSLog(@"error calucate of page index");int a=0;a=1/a;}// NSLog(@"排序中 把pView=%d插入 %d 位置",pView, pageIndex-1);[aryOrderd replaceObjectAtIn

{

// NSLog(@"error calucate of page index");

int a=0;a=1/a;

}

// NSLog(@"排序中 把pView=%d插入 %d 位置",pView, pageIndex-1);

[aryOrderd replaceObjectAtIndex:(pageIndex-1) withObject:pView];

}

}

[aryTemp release];

//排完后开始整体挪动位置

if(x < minStart)

{

NSLog(@"-----------------------need left round");

//头位置放到最后,其他位置左移

for (i=0; i<>

{

UIView* pView = [aryOrderd objectAtIndex:i];

if(i==(aryOrdredSize-1))

{

CGPoint centerPt = pView.center;

centerPt.x = perWidth/2;

pView.center = centerPt;

}

else

{

CGPoint centerPt = pView.center;

centerPt.x += perWidth;

pView.center = centerPt;

}

NSLog(@"================pView.center.x = %f",pView.center.x);

}

}

if(x >maxStart)

{

//末尾位置放到前,其他位置右移

NSLog(@"-----------------------need right round");

for (i=0; i<>

{

UIView* pView = [aryOrderd objectAtIndex:i];

if(i==0)

{

CGPoint centerPt = pView.center;

centerPt.x = totalWidth - perWidth/2;

pView.center = centerPt;

}

else

{

CGPoint centerPt = pView.center;

centerPt.x -= perWidth;

pView.center = centerPt;

}

NSLog(@"================pView.center.x = %f",pView.center.x);

if(pView.center.x > totalWidth )

{

int a=2;

a++;

}

}

}

}

[aryOrderd release];

上一页  1 2 3 4 5 6 7 8  下一页

Tags:iPhone 实现 页面

编辑录入:coldstar [复制链接] [打 印]
赞助商链接