title: Making Progress View Visible
body: <p>I'm working on a very simple iOS app to get me started programming. It's a tab based application, so there is a MainWindow.xib along with a FirstView.xib and SecondView.xib. All of this is happening in the first view. I want to add a Progress bar to the First View, and when I added the object it attached itself to FirstView.xib and shows up and lets me move it around. To test, the alpha is set at 1.00 and the progress is set at 0.5. Regardless of this, it doesn't show up no matter what I do. What am I doing wrong?</p>
  
  <p>AppDelegate.m:</p>
  
  <pre><code>@synthesize window=_window;
  
  @synthesize tabBarController=_tabBarController;
  
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
      // Add the tab bar controller's current view as a subview of the window
      self.window.rootViewController = self.tabBarController;
      [self.window makeKeyAndVisible];
      return YES;
  }
  
  - (void)applicationWillResignActive:(UIApplication *)application
  {
  }
  
  - (void)applicationDidEnterBackground:(UIApplication *)application
  {
  }
  
  - (void)applicationWillEnterForeground:(UIApplication *)application
  {
  }
  
  - (void)applicationDidBecomeActive:(UIApplication *)application
  {
  }
  
  - (void)applicationWillTerminate:(UIApplication *)application
  {
  }
  
  - (void)dealloc
  {
      [_window release];
      [_tabBarController release];
      [super dealloc];
  }
  @end
  </code></pre>
  
  <p>FirstViewController.h:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  NSTimer *stopWatchTimer;
  NSDate *startDate;
  
  @interface FirstViewController : UIViewController {
  
      UILabel *label;
      UILabel *stopWatchLabel;
      UIProgressView *progressBar;
      UIButton *topButton;
  }
  @property (nonatomic, retain) IBOutlet UILabel *stopWatchLabel;
  @property (nonatomic, retain) IBOutlet UIProgressView *progressBar;
  - (IBAction)onStartPressed:(id)sender;
  - (IBAction)onStopPressed:(id)sender;
  - (IBAction)onResetPressed:(id)sender;
  
  @end
  </code></pre>
  
  <p>FirstViewController.m</p>
  
  <pre><code>#import "FirstViewController.h"
  
  
  @implementation FirstViewController
  @synthesize progressBar;
  @synthesize stopWatchLabel;
  
  
  /*
  // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.*/
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  }
  
  
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  {
      // Return YES for supported orientations
      return (interfaceOrientation == UIInterfaceOrientationPortrait);
  }
  
  
  - (void)didReceiveMemoryWarning
  {
      // Releases the view if it doesn't have a superview.
      [super didReceiveMemoryWarning];
  
      // Release any cached data, images, etc. that aren't in use.
  }
  
  
  - (void)viewDidUnload
  {
      [self setStopWatchLabel:nil];
      [topButton release];
      topButton = nil;
      [super viewDidUnload];
  
      // Release any[progress release];
      progressBar = nil;
      [progressBar release];
      progressBar = nil;
      [self setProgressBar:nil];
      //retained subviews of the[self setProgressBar:nil];
  
      // e.g. self.myOutlet = nil;
  }
  
  static NSInteger counter=0;
  static NSInteger secs=0;
  static NSInteger mins=0;
  static NSInteger hrs=0;
  
  - (void)dealloc
  {
      [stopWatchLabel release];
      [label release];
  
      [topButton release];
      [super dealloc];
  }
  
  -(void)updateTimer {
  //updates the timer    }
  
      -(void)clearTimer {
  //clears the timer        
  
  
  }
  
  -(void)stopTimer{
  //stops the timer    }
  
  
  - (IBAction)onStartPressed:(id)sender {
      //stopWatchLabel.text=@"Start Pressed";
      progressBar.alpha=1.0;
  //run timer    }
  
  
  - (IBAction)onStopPressed:(id)sender {
      [self stopTimer];
  }
  
  - (IBAction)onResetPressed:(id)sender {
      [self stopTimer];
      [self clearTimer];
  }
  @end
  </code></pre>