I am new to IOS Development. I am stuck at a place where I want to use the object from a void function in some other function which I am calling from that void function. Can you tell me how to do it?
Here’s the code:
-(void)buttonPressed: (id) sender withEvent: (UIEvent *) event{
UIButton *mybtn= (UIButton*) sender;
UserDetails *user; (user is the object of the UserDetails class which I want to use).
user= [searchResult objectAtIndex.:mybtn.tag];
[self sendInviteData]; (I want to use "user" in this function).
}
SearchResult is the array which has the search results from a search bar. there is a in each cell. When I am click on a button I want to get that data in the user object and send it to sendInvite function.
do something like that
then you call it with