-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create new IBOutlets in ProfileContentHeaderView.swift #2
Comments
Did a "bad" workaround by coding the assignment of this label in TimelineViewController instead of ProfileContentHeaderView.swift. Any help debugging why I can't add new UIlabel outlets to ProfileContentHeaderView.swift is appreciated. |
@timothy1ee Thanks for taking a look. IIRC, I originally created this content view in its own viewcontroller outside of a tableview. Then I realized the profile page was just the same as my home timeline but with an optional profile header at the top. I may have then placed it in a stack view where the profile header was the top of the stack and the timeline table view was the second thing in the stack. Then I learned about headerviews in tableviews. So I converted it to a custom view and put that custom view into a headerview in my home timeline. The way I either converted it into a custom view or placed the view into the headerview is probably what broke it. I did this before Jane gave the lecture on custom views, so in moving between view controllers I probably did some cutting and pasting of of the labels and elements in the tree outline pane of the storyboard in an effort to preserve the autolayout constraints so I wouldn't have to re-do them every time I tried a different place to put this collection of elements. |
I see, I think it might be a Storyboard bug, but I'm not sure. The way I would normally do this is via a xib. There's also a feature in Storyboard where if you include a custom view that has its own xib, it'll preview the xib in the Storyboard, which gets you the same thing you have now, but it lets you keep the header design file separate, which can be nice. Just a warning, that preview feature is still slightly new-ish, so it's a little finicky, I haven't tried it in Xcode 9. |
Even though the superview of the "tweet counts" text label is properly assigned the custom class of ProfileContentHeaderView.swift and that file shows up as an option for Automatic assistant editing, I can't seem to ctrl-drag any new outlets into the class file.
The text was updated successfully, but these errors were encountered: