Quiz-76 and quiz-120 don't fit on the screen iPhone retina

#1

I am running Xcode 5.3 under Mac Yosemite. I am at Chapter 6 and have completed the Silver Challenge. Code is attached.The only problem is that the Quiz-76 or Quiz-120 png’s from Resources don’t fit on the tabbarline and overlay the title for the Quiz tab. I am running on the iPhone 7 Simulator.

[code]//
// BNRQuizViewController.m
// Quiz
//
// Created by Nelson Capes on 8/17/15.
// Copyright © 2015 Big Nerd Ranch. All rights reserved.
//

#import “BNRQuizViewController.h”

@interface BNRQuizViewController ()

@property(nonatomic) int currentQuestionIndex;
@property(nonatomic, copy)NSArray *questions;
@property(nonatomic, copy)NSArray *answers;
@property(nonatomic, weak) IBOutlet UILabel *questionLabel;
@property(nonatomic, weak)IBOutlet UILabel *answerLabel;

@end

@implementation BNRQuizViewController

  • (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    {
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
    self.questions = @[@“From what is cognac made?”,
    @“What is 7 + 7?”,
    @“What is the capitol of Vermont?”];

      self.answers = @[@"Grapes",
                       @"14",
                       @"Montpelier"];
      
      
      // set the tab bar item's title
      self.tabBarItem.title = @"Quiz";
      //create UIImage from a file
      // this will use Quiz-76.png on retina display devices
     UIImage *image = [UIImage imageNamed:@"Quiz-76.png"];
      
      // put that image on the tab bar line
      self.tabBarItem.image = image;
    

    }
    return self;
    }

-(IBAction)showQuestion:(id)sender
{
// step to the next question
self.currentQuestionIndex++;
// am i past the last question?
if(self.currentQuestionIndex == [self.questions count]){
// go back to the first question
self.currentQuestionIndex = 0;
}
// get the string at that index in the questions array
NSString *question = self.questions[self.currentQuestionIndex];
// display the string in the question label
self.questionLabel.text = question;
// reset the answer label
self.answerLabel.text = @"???";
}
-(IBAction)showAnswer:(id)sender
{
// what is the answer to the current question?
NSString *answer = self.answers[self.currentQuestionIndex];
// display it in the answer label
self.answerLabel.text = answer;
}
// log a message the first time a view controller loads. Unlike HypnosisViewController, ReminderViewController
// will only receive viewDidLoad when the user presses its button the tab bar
-(void)viewDidLoad
{
[super viewDidLoad];
NSLog(@“BNRQuizViewController loaded its view.”);
}

  • (void)didReceiveMemoryWarning
    {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    }

@end
[/code]

[code]//
// BNRAppDelegate.m
// Hypnosister
//
// Created by Nelson Capes on 8/21/15.
// Copyright © 2015 Big Nerd Ranch. All rights reserved.
//

#import “BNRAppDelegate.h”
#import “BNRHypnosisView.h”
#import “BNRHypnosisViewController.h”
#import “BNRReminderViewController.h”
#import “BNRQuizViewController.h”
@implementation BNRAppDelegate

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    BNRHypnosisViewController *hvc = [[BNRHypnosisViewController alloc]init];

    // this will get a pointer to an object that represents an app bundle
    NSBundle *appBundle = [NSBundle mainBundle];

    // look in the appBundle for the file BNRReminderViewController.xib
    BNRReminderViewController *rvc =
    [[BNRReminderViewController alloc]initWithNibName:@“BNRReminderViewController” bundle:appBundle];

    NSBundle *qbundle = [NSBundle mainBundle];
    BNRQuizViewController *qvc = [[BNRQuizViewController alloc]initWithNibName:@“BNRQuizViewController” bundle:qbundle];

    UITabBarController *tabBarController = [[UITabBarController alloc]init];
    tabBarController.viewControllers = @[hvc, rvc, qvc];

    self.window.rootViewController = tabBarController;

    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
    }

  • (void)applicationWillResignActive:(UIApplication *)application
    {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
    }

  • (void)applicationDidEnterBackground:(UIApplication *)application
    {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
    }

  • (void)applicationWillEnterForeground:(UIApplication *)application
    {
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
    }

  • (void)applicationDidBecomeActive:(UIApplication *)application
    {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    }

  • (void)applicationWillTerminate:(UIApplication *)application
    {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
    }

@end
[/code]

#2

I adjusted the size to .42 x .42 with Preview and it now fits on the tab bar but it is opaque…it doesn’t show up as the symbol in the icon.