UITextView insert

Discussion in 'iPhone/iPad Programming' started by rubenmit, Aug 8, 2012.

  1. macrumors newbie

    #1
    Hi all, I need to insert several UITextView but pressing a button insert.
    The insertion should be when the program is running.
    Thanks!
     
  2. macrumors 65816

    jnoxx

    #2
    what... care to explain a bit more? not making any sence
     
  3. macrumors newbie

    #3
    I would add a touch UITextView doing in a button, while the program is running
     
  4. macrumors 65816

    jnoxx

    #4
    I still have no clue what you're talking about?
    You want to add a UITextView when pressing a button...?
     
  5. macrumors newbie

    #5
    Yes, I want to add a UITextView (and other like IUView, IUImage...) when pressing a button, and
    I want to resize, move, change color...
    Like a power point, for now I just want to insert a UITextView.
     
  6. macrumors 65816

    jnoxx

    #6
    Connect a IBAction to a button then do..
    Code:
    UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0,100,100];
    [textView setText:@"TEST TEXT"];
    [self.view addSubview:textView];
    
    I typed this out of my head, so check for code completion in the code.
     
  7. macrumors 6502a

    Duncan C

    #7
    I gather that English is not your native language? You might want to get some help from a fluent English speaker, as your first couple of posts are just about unreadable.
     
  8. macrumors newbie

    #8
    Yes but if I want to create multiple identical objects, How do I for set diferent names?
     
  9. macrumors 6502a

    Duncan C

    #9
    You need to write code that creates multiple text fields at different locations, sets them to contain different text, and then adds them to your view controller's content view.

    How you do that specifically will depend on what you want to do.

    You could allocate a grid space on your app screen for these fields, and then write code that loops through the rows and columns, adding a text field at each location in the grid.

    You asked "How do I for set diferent names?" What different names? How will you generate these different names? Looping?
     

Share This Page