iOS - add padding to subview

621 Views Asked by At

i add Tapkul calendar to my project , but as it mix with iphone time how can i add some padding from to my subview (calendar)

here my code to add it to my project

  calendar =  [[TKCalendarMonthView alloc] init];
    calendar.delegate = self;
    calendar.dataSource = self;
    calendar.frame = CGRectMake(0, 0,  320,400);


[self.view addSubview:calendar];

any suggestion

enter image description here

2

There are 2 best solutions below

0
Fahim Parkar On BEST ANSWER

How about this?

calendar.frame = CGRectMake(0, 20,  320,400);
                               ^
-------------------------------|
1
gran33 On

Use CGRectInset like this:

calendar.bounds = CGRectInset(calendar.frame, 10.0f, 10.0f);