ios橫向選單+頁面滑動
檢視次數:9122
大小:11 b
demo:
橫向選單+頁面滑動
例子uiviewcontroller *vc1 = [[uiviewcontroller alloc]init];
[vc1.view setbackgroundcolor:[uicolor redcolor]];
uiviewcontroller *vc2 = [[uiviewcontroller alloc]init];
[vc2.view setbackgroundcolor:[uicolor bluecolor]];
uiviewcontroller *vc3 = [[uiviewcontroller alloc]init];
[vc3.view setbackgroundcolor:[uicolor graycolor]];
uiviewcontroller *vc4 = [[uiviewcontroller alloc]init];
[vc4.view setbackgroundcolor:[uicolor greencolor]];
uiviewcontroller *vc5 = [[uiviewcontroller alloc]init];
[vc5.view setbackgroundcolor:[uicolor purplecolor]];
uiviewcontroller *vc6 = [[uiviewcontroller alloc]init];
[vc6.view setbackgroundcolor:[uicolor lightgraycolor]];
uiviewcontroller *vc7 = [[uiviewcontroller alloc]init];
[vc7.view setbackgroundcolor:[uicolor yellowcolor]];
cgrect rect = cgrectmake(0, 20, kscreen_width, kscreen_height);
lyscrollmenu *lymenu = [[lyscrollmenu alloc]initwithframe:rect
controllerviewarray:@[vc1.view,vc2.view,vc3.view,vc4.view,vc5.view,vc6.view,vc7.view]
titlearray:@[@"標題1",@"標題2",@"標題3",@"標題4",@"標題5",@"標題6",@"標題7"]
maxshowtitlenum:5];
lymenu.delegate = self;
[self.view addsubview:lymenu];
收藏分享到:
效果圖我來說兩句
您還沒有登入!請登入或註冊
jQuery實現橫向滑鼠滾輪效果
場景 需要實現滾輪滾動控制橫向滾動條效果的滾動 1.在需要的jsp頁面導如包jquery.mousewheel.js 2.div上註冊滾輪事件 jquery container bind mousewheel function event,delta 3.3.如果要實現左右滾動,滾輪事件中需要處理的...
iOS 橫向使用iPhone預設的翻頁效果
大致思路使用兩層輔助uiview的旋轉來實現新增後的view的橫向翻頁效果 catransform3d transforma catransform3drotate catransform3didentity,degreestoradian 90 0,0,1.0f catransform3d tra...
ios 橫向日曆控制項的使用
第二步建立日曆控制項 asweekselectorview weekselector return weekselector 第三步新增 asweekselectorviewdelegate 第四步 設定當前選中的日期 self weekselector firstweekday 2 設定周一選中 ...