如何为iOS制作PageTitleStrip?

时间:2014-04-25 11:30:06

标签: ios

我创建了一个ScrollView。在这个Scrollview上我添加了4 UiView ans。

我的代码是这样的:

// Set the scroll ContentSize & ContentOffset

[scroll setContentOffset:CGPointMake(320, 0)];
[scroll setContentSize:CGSizeMake(320 * 4, 420)];

[View1 setFrame:CGRectMake(0, 0, 320, 420)];
[View2 setFrame:CGRectMake(320, 0, 320, 420)];
[View3 setFrame:CGRectMake(320 * 2, 0, 320, 420)];
[View4 setFrame:CGRectMake(320 * 3, 0, 320, 420)];

我这样做。但这不是完美的方式。我想如何才能完美PageTitleStripe。假设当用户滚动页面时,顶部名称栏也按照滚动移动。例如: Google Play商店

This is my requirement. there is a purple color bar. my requirement is when i scroll the view that time that purple color bar will be move according to scroll

0 个答案:

没有答案