From dcf698e618cdfa50789ea1e45f66ee0a0a264d9b Mon Sep 17 00:00:00 2001 From: Ilter Cengiz Date: Thu, 7 Nov 2013 22:17:29 +0200 Subject: [PATCH] =?UTF-8?q?UIView=E2=80=99s=20that=20is=20used=20as=20tabs?= =?UTF-8?q?=20are=20now=20have=20auto=20resizing=20by=20width=20and=20heig?= =?UTF-8?q?ht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way, changes in tabs' sizes are reflected to their contents as well. This provides contents to be centered in every size. --- ICViewPager/ICViewPager/ViewPagerController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ICViewPager/ICViewPager/ViewPagerController.m b/ICViewPager/ICViewPager/ViewPagerController.m index a19384c..d3c1e88 100644 --- a/ICViewPager/ICViewPager/ViewPagerController.m +++ b/ICViewPager/ICViewPager/ViewPagerController.m @@ -771,6 +771,7 @@ - (TabView *)tabViewAtIndex:(NSUInteger)index { // Get view from dataSource UIView *tabViewContent = [self.dataSource viewPager:self viewForTabAtIndex:index]; + tabViewContent.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; // Create TabView and subview the content TabView *tabView = [[TabView alloc] initWithFrame:CGRectMake(0.0, 0.0, [self.tabWidth floatValue], [self.tabHeight floatValue])];