Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 14th, 2013  |  syntax: None  |  size: 0.43 KB  |  views: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. UITextField *textField = [[UITextField alloc] init];
  2. textField.frame = CGRectMake(38.0f, 0.0f, self.view.frame.size.width - 38.0f, 40.0f);
  3. textField.text = @"Hello";
  4. textField.background = [[UIImage imageNamed: @"field.png"] stretchableImageWithLeftCapWidth:12 topCapHeight:19];
  5. textField.backgroundColor = [UIColor whiteColor];
  6. textField.userInteractionEnabled = YES;
  7.  
  8. [bar addSubview: textField];
  9.        
  10. bar.userInteractionEnabled = TRUE;
clone this paste RAW Paste Data