【问题标题】:I cannot able to curl different images in Page based application using StoryBoard(iOS5)我无法使用 StoryBoard(iOS5)在基于页面的应用程序中卷曲不同的图像
【发布时间】:2012-02-09 14:20:56
【问题描述】:

我正在使用故事板来创建基于页面的应用程序。当我运行我的应用程序时,我可以在每个页面中卷曲相同的图像。但是当我卷曲页面时,我想用不同的图像卷曲。

【问题讨论】:

    标签: ios5 storyboard


    【解决方案1】:

    你能提供更多关于你已经尝试过的细节吗?

    你是否已经实现了 UIPageViewControllerDataSource?这是您编写“viewControllerBeforeViewController”和“viewControllerAfterViewController”方法的地方。一旦你编写了这些方法,你应该能够从一个页面移动到另一个页面。如果您查看 Xcode 中包含的项目模板,“ModelController”类中有一个示例。

    祝你好运!

    【讨论】:

    • 我已经实现了数据源。页面卷曲效果正在工作。但是,所有页面在卷曲时都会获取相同的图像。能否请您帮我编写代码以使用情节提要在 iOS5 中的页面卷曲模板中实现图像数组。
    • 继续发布您当前的“之前”和“之后”代码。我看看能不能帮到你。
    • - (void)viewDidLoad { [super viewDidLoad]; NSLog(@"详细视图"); NSArray *img = [[NSArray alloc]initWithObjects: [UIImage imageNamed:@"WEEK100002.png"], [UIImage imageNamed:@"AngelandSatan.png"], nil]; //img.image=[UIImage imageNamed:@"WEEK10001.png"]; // 在加载视图后做任何额外的设置,通常是从一个 nib。 }
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-09-16
    • 1970-01-01
    • 1970-01-01
    • 2023-03-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多