简体   繁体   中英

iOS Tab Bar question

based on the Tab Bar default project, I tried to build a program with 5 tabs. This part works.

On tab 2 are several labels I want to change, mostly their text. I am connecting the labels to outlets like this:

IBOutlet UILabel* myName;

Now I can tell myName to do whatever I want. Change text for instance. This was working when the view was on tab 1, but now on tab 2 they contain NILL at runtime. Redid all bindings after removing all, but this seems not to be the problem.

How do change labels that are on the different views a tab bar loads?

I am very sure that I oversee something fundamental, but I have no idea what this might be.

JFYI, found the bug.

A classic one: 'error sitting in fromt of screen' /Blush

I didnt setup the fileowner proper for the view. Thought I checked that, but seems not.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM