mardi 23 juin 2015

Add subview to a custom class

I have a UITextField that I want to create a custom class on. So I created a file with a subclass of UITextField. Next, in the custom class, I want to implement a tableView. Kind of like a auto-complete textField.

I started creating it, and added the tableView like this:

[self addSubview:self.tableView];

When I run the app, the tableView is in the textField, so I can only see part of the tableView. How can I add it as a subview so I can see the full tableView?

See more ..

Aucun commentaire:

Enregistrer un commentaire