在Iphone中将图像添加到日历视图 [英] Adding an Image to the calendar View in Iphone

查看:115
本文介绍了在Iphone中将图像添加到日历视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在iPhone的默认日历视图的顶部添加一个图像.如果有人知道如何执行此操作,请回答.我正在使用Tapku库以显示日历.如果可以在其中实现,也可以使用Kal库.

I need to add an image at the top of the default calendar view of the iPhone. If any body knows how to implement this please respond.I am using the Tapku library inorder to show the calendar. Kal library also can be used if this can implement there.

在下面附上日历视图,我需要在该日历的顶部标题栏下方放置一幅图像.日历需要在图像下方看到.

Below attached the calendar view and i need to put an image at the top of this calendar just below the title bar.The calendar need to see just below the image.

推荐答案

创建TKCalendarMonthViewController的子类并覆盖loadView:

Create a subclass of TKCalendarMonthViewController and override loadView:

- (void)loadView {

    [super loadView];

    // Get the frame of the calendar view
    CGRect frame = self.monthView.frame;

    // Shift it down to make room for the image view
    frame.origin.y += 50; 

    // Add your image view, e.g. :  

    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, frame.size.width, 50.0)];
    [self.view addSubview:imageView];
}

如果您使用的是TKCalendarMonthTableViewController,其中包括日历视图下方的表格,那么您还需要调整表格的大小.请查看TKCalendarMonthTableViewController的loadView以了解其设置.

If you're using TKCalendarMonthTableViewController, which include the table underneath the calendar view, then you'll need to resize the table too. See the loadView of the TKCalendarMonthTableViewController to see how it's set up.

这篇关于在Iphone中将图像添加到日历视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆