Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Matthew Muscat
Courses Plus Student 1,757 PointsHow can I make an 'edit' BarButton once clicked allow the user to change the text in a UITableView cell?
I'm creating an app in Swift and am need of assistance. I have created a TableView with a toolbar at the bottom where 3 buttons exist. One button is 'Edit'; i want this button when pressed to force the user to have to click on one of the TableView cells which re-names the cells text.
Just pointing out some ideas, maybe when having to rename the cells text a UIAlertView pops up which can be renamed from there or maybe implementing a UITextField im not really sure..
This picture is the layout. prntscr.com/5vigiu
1 Answer
agreatdaytocode
24,757 PointsHello Matthew,
Check out this blog post
Matthew Muscat
Courses Plus Student 1,757 PointsMatthew Muscat
Courses Plus Student 1,757 PointsI kind of understand what's happening here, im like beginner-intermediate at swift programming (only language) so im wanting to ask you a few questions. I have my own tableView that i've created and the only part of that app example I want in mine is the editing. There's a lot of added extras and im not sure what/what not to include in my class. I still want the 'Edit' button when pressed to do something here but if this cant let me know and i'll stick to this link. Could I send you my tableView class and you try and explain in depth how I go about it?? If you could even change my code that would be amazing of you.
Thanks
Code:
pastebin.com/5zTQ5Z5w
VIew graphic:
prntscr.com/5vkuwr