I have a barcode scanner on one view, and after the user has scanned the barcode, the app takes them to another view (BoilerDetails) where the barcode text field has been pre-filled.

I understand that the viewcontroller is null when it hasn't come into view and I can'tchange the UITextField text directly. This so far has given me an error.. How can I fix this?

BarcodeScannerViewController.m

BoilerDetailsViewController *viewCtrl = [[BoilerDetailsViewController alloc] initWithNibName:nil bundle:nil];
[viewCtrl setBarcode:strBarcode];
[self.navigationController pushViewController:viewCtrl animated:YES];


BoilerDetailsViewController.h

@interface BoilerDetailsViewController : SubViewControllerBase
@property (retain, nonatomic) NSString *barcode;
@property (retain, nonatomic) IBOutlet UITextField *barcodeField;
- (void)setBarcode:(NSString*)strBarcode;
@end


BoilerDetailsViewController.m

-(void)setBarcode:(NSString *)strBarcode
{
    self.barcode = strBarcode;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    [_barcodeField setText:self.barcode];
    // Do any additional setup after loading the view from its nib.
}



Question: Do the four brothers in TMNT train in other weapons?
Answer: All of the turtles were trained by Master Splinter who learned his martial arts from his owner before he was mutated. He taught the Turtles all the martial arts they knew and each Turtle is quite capable no matter what weapons they used. They are all capable open-hand fighters and able to use any weapon they have at hand when necessary. 

When the original comics were written, each had chosen a signature weapon that suited their mental preferences and combat styles. Eastman and Laird showed many examples during their appearances in the comic series. The cartoons were far less likely to show such training since the cartoons were often a marketing tool for associated toys.



The Turtles trained from 7:00 AM until noon. Master Splinter extols that diligence is the only path to mastery. Tales of the TMNT (Vol. 2) #55



Bo Staff (Donatello) vs Tonfa (Raphael) from Teenage Mutant Ninja Turtles vol.1 #9



Leonardo vs Raphael in sword training from Teenage Mutant Ninja Turtles vol.1 #9



Leonardo effectively throws shuriken from Teenage Mutant Ninja Turtles vol.1 #9


Leonardo (Dual Katanas): The Sword is the weapon of leadership and command. The de facto leader of the Turtles, Leonardo is courageous, decisive, and a disciplined student of martial arts. As a strict adherent to Bushido, he has a very strong sense of honor and justice.
Raphael (Dual Sais): The sai is used both offensively and defensively, can be used to pierce or club an opponent and is able to disarm an opponent. Sais can also be thrown. The team's "Hot-Head", Raphael has an aggressive nature and seldom hesitates to throw the first punch. He is also an intense fighter. His personality can be alternately fierce, sarcastic, and full of angst, and oftentimes delivers deadpan humor. Still, he is good-hearted, willing to protect others and is intensely loyal.
Michelangelo (Dual Nunchakus): Nunchaku are fast and deadly, requiring extreme skill and reflexes. Michelangelo is easily the most agile and quick of all the Turtles. The easy-going and free-spirited Michelangelo provides much of the comic relief. While he loves to read comics and eat pizza, this Turtle also has an adventurous side. 
Donatello (Bo Staff): Used to keep an opponent at range, but capable of dealing devastating damage in the hands of a master. The inventor, and technology geek, Donatello has a reputation as something of a smart aleck. He is perhaps the least violent Turtle, preferring to use his intellect to solve conflicts. 
Splinter - The Turtles' sensei and adoptive father, Splinter is a mutant rat who learned the ways of ninjutsu from his own master, Hamato Yoshi. Splinter is able to use any and all martial arts weapons. In the 1987 TV series and Archie Comics series, Splinter was Hamato Yoshi mutated into a rat instead of being just Yoshi's pet. Splinter's name is a parody of Stick, the man who mentored Daredevil.