Browse Source

Custom titleView layout fix

yogevbd 6 years ago
parent
commit
9391cd52fd
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      lib/ios/RNNCustomTitleView.m

+ 8
- 1
lib/ios/RNNCustomTitleView.m View File

33
 	return self;
33
 	return self;
34
 }
34
 }
35
 
35
 
36
+- (CGSize)sizeThatFits:(CGSize)size {
37
+	if ([self.alignment isEqualToString:@"fill"]) {
38
+		return size;
39
+	}
40
+	return [super sizeThatFits:size];
41
+}
42
+
36
 - (void)layoutSubviews {
43
 - (void)layoutSubviews {
37
 	[super layoutSubviews];
44
 	[super layoutSubviews];
38
 	if ([self.alignment isEqualToString:@"fill"]) {
45
 	if ([self.alignment isEqualToString:@"fill"]) {
39
-		[self.subView setFrame:self.bounds];
46
+		[self.subView setFrame:self.frame];
40
 	}
47
 	}
41
 }
48
 }
42
 
49