有沒有人在這裏知道加載dynamicCell
到UITableViewController
,從每個單元格向不同UIScrollView
加載dynamicCell
的好教程(以便在設備上查看完整的照片內容)。UITableView動態細胞與UIScrollView多視圖
我一直在看這個問題一段時間,不能讓我的頭靠近它!我可以將一個UITableViewController作爲一個靜態單元指向ScrollView,但我似乎無法通過uipagecontroller
獲得不同的的dynamicCell!下面創建一個模型(Reciepe.h
)
@interface Recipe : NSObject
@property (nonatomic, strong) NSString *name; // name of recipe
@property (nonatomic, strong) NSString *imageFile; // image filename of recipe
@end
有關主視圖命名(ReciepeBookViewController.m
)的ViewDidLoadas的跟隨
- (void)viewDidLoad {
[super viewDidLoad];
// Initialize table data
Recipe *recipe1 = [Recipe new];
recipe1.name = @"Egg Benedict";
recipe1.imageFile = @"egg_benedict.jpg";
Recipe *recipe2 = [Recipe new];
recipe2.name = @"Mushroom Risotto";
recipe2.imageFile = @"mushroom_risotto.jpg";
Recipe *recipe3 = [Recipe new];
recipe3.name = @"Full Breakfast";
recipe3.imageFile = @"full_breakfast.jpg";
Recipe *recipe4 = [Recipe new];
recipe4.name = @"Hamburger";
recipe4.imageFile = @"hamburger.jpg";
Recipe *recipe5 = [Recipe new];
recipe5.name = @"Ham and Egg Sandwich";
recipe5.imageFile = @"ham_and_egg_sandwich.jpg";
Recipe *recipe6 = [Recipe new];
recipe6.name = @"Creme Brelee";
recipe6.imageFile = @"creme_brelee.jpg";
Recipe *recipe7 = [Recipe new];
recipe7.name = @"White Chocolate Donut";
recipe7.imageFile = @"white_chocolate_donut.jpg";
Recipe *recipe8 = [Recipe new];
recipe8.name = @"White Chocolate Mocha";
recipe8.imageFile = @"starbucks_coffee.jpg";
Recipe *recipe9 = [Recipe new];
recipe9.name = @"Vegetable Curry";
recipe9.imageFile = @"vegetable_curry.jpg";
Recipe *recipe10 = [Recipe new];
recipe10.name = @"Instant Noodle with Egg";
recipe10.imageFile = @"instant_noodle_with_egg.jpg";
Recipe *recipe11 = [Recipe new];
recipe11.name = @"Noodle with BBQ Pork";
recipe11.imageFile = @"noodle_with_bbq_pork.jpg";
Recipe *recipe12 = [Recipe new];
recipe12.name = @"Japanese Noodle with Pork";
recipe12.imageFile = @"japanese_noodle_with_pork.jpg";
Recipe *recipe13 = [Recipe new];
recipe13.name = @"Green Tea";
recipe13.imageFile = @"green_tea.jpg";
Recipe *recipe14 = [Recipe new];
recipe14.name = @"Thai Shrimp Cake";
recipe14.imageFile = @"thai_shrimp_cake.jpg";
Recipe *recipe15 = [Recipe new];
recipe15.name = @"Angry Birds Cake";
recipe15.imageFile = @"angry_birds_cake.jpg";
Recipe *recipe16 = [Recipe new];
recipe16.name = @"Ham and Cheese Panini";
recipe16.imageFile = @"ham_and_cheese_panini.jpg";
recipes = [NSArray arrayWithObjects:recipe1, recipe2, recipe3, recipe4, recipe5, recipe6, recipe7, recipe8, recipe9, recipe10, recipe11, recipe12, recipe13, recipe14, recipe15, recipe16, nil];
}
當用戶選擇「火腿和奶酪帕尼尼」去到另一個我需要viewController與UIScrollController
與PageController
與圖像數組,當用戶選擇憤怒的小鳥蛋糕到另一個視圖與UIScrollController與PageController與另一個圖像陣列等,每個Reciepe
。
可有人告訴我合適的解決方案或適當的教程
感謝您的幫助;但我需要'DetailViewController'另一個圖像數組;所以請如果你能爲我提供一個教程 –