I have one UIViewController containing a UITableView. Along with this I have 3 buttons and 4 Mutablable arrays.
Array "prime" is the primary datasource for the table view.
When I hit button a , b or c I write
prime= a
[table reloadData];
or
prime= b
[table reloadData];
The problem I have is that after say 2 button pushes prime is not equal to either a or b. It contents now contain the contents of a "and" b and it's contents will continue to accumulate after every assign.
How can I make 1 nsmutuablearray switch its contents to be that of another?
I know I can just remove all objects and then add more. I more wanted to know if its possible to make prime be a pointer to ab or c?
尝试尝试:prime = [副本];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.