@@ -68,6 +68,7 @@ - (id)init
6868 _detachButtons = NO ;
6969 _fullCircleCustomImage = NO ;
7070 _hideSeparatorLineView = NO ;
71+ _customImageScale = 1 ;
7172
7273 defaultSpacing = [self configureAVWidth ];
7374 defaultHeight = [self configureAVHeight ];
@@ -151,7 +152,7 @@ - (void) checkCustomizationValid {
151152
152153 if (_subTitle == nil || [_subTitle isEqualToString: @" " ])
153154 if (_title == nil || [_title isEqualToString: @" " ])
154- _subTitle = @" You need to have a title or subtitle to use FCAlertView 😀 " ;
155+ NSLog ( @" FCAlertView Warning: Your Alert should have a title and/ or subtitle. " ) ;
155156
156157 if (doneTitle == nil || [doneTitle isEqualToString: @" " ]) {
157158 doneTitle = @" OK" ;
@@ -277,7 +278,7 @@ - (void)drawRect:(CGRect)rect {
277278 result.width - defaultSpacing,
278279 defaultHeight - 30 );
279280
280- if (self. title == nil ) // Frames for when AlertView doesn't contain a title
281+ if (_title == nil || _title. length == 0 ) // Frames for when AlertView doesn't contain a title
281282 alertViewFrame = CGRectMake (self.frame .size .width /2 - ((result.width - defaultSpacing)/2 ),
282283 self.frame .size .height /2 - ((alertViewFrame.size .height - 50 )/2 ),
283284 result.width - defaultSpacing,
@@ -334,7 +335,7 @@ - (void)drawRect:(CGRect)rect {
334335
335336 NSInteger descriptionLevel = 45 .0f ;
336337
337- if (_title == nil ) {
338+ if (_title == nil || _title. length == 0 ) {
338339
339340 descriptionLevel = 15 .0f ;
340341 alertViewFrame = CGRectMake (alertViewFrame.origin .x ,
@@ -844,18 +845,20 @@ - (void)drawRect:(CGRect)rect {
844845 alertViewVector.image = [vectorImage imageWithRenderingMode: UIImageRenderingModeAlwaysTemplate];
845846 }
846847
847- if (_fullCircleCustomImage) {
848- alertViewVector.frame = CGRectMake (alertViewContents.frame .size .width /2 - 30 .0f ,
849- -30 .0f ,
850- 60 .0f ,
851- 60 .0f );
852- } else {
853- alertViewVector.frame = CGRectMake (alertViewContents.frame .size .width /2 - 15 .0f ,
854- -15 .0f ,
855- 30 .0f ,
856- 30 .0f );
848+ if (_fullCircleCustomImage)
849+ _customImageScale = 2 ;
850+
851+ if (_customImageScale <= 0 ) {
852+ _customImageScale = 1 ;
857853 }
858854
855+ CGFloat vectorSize = 30 .0f * MIN (2 , _customImageScale);
856+
857+ alertViewVector.frame = CGRectMake (alertViewContents.frame .size .width /2 - (vectorSize/2 ),
858+ -(vectorSize/2 ) - 0.5 ,
859+ vectorSize,
860+ vectorSize);
861+
859862 alertViewVector.contentMode = UIViewContentModeScaleAspectFit;
860863 alertViewVector.userInteractionEnabled = 0 ;
861864 alertViewVector.tintColor = _colorScheme;
@@ -915,7 +918,7 @@ - (void)drawRect:(CGRect)rect {
915918 // ADDING RATING SYSTEM
916919
917920 ratingController = [[UIView alloc ] initWithFrame: CGRectMake (20 ,
918- descriptionLevel + descriptionLabelFrames.size.height + 32.5 + 15 ,
921+ descriptionLevel + descriptionLabelFrames.size.height + 32.5 + 15 + ( MIN ( 1 , alertTextFields.count)*(_textField.frame.size.height + 7.5 )) ,
919922 alertViewFrame.size.width - 40 ,
920923 40 )];
921924
0 commit comments