ios - Connections from Xib file to viewController never initialize -
i'm facing strange problem (and though lot of answers talk it) reason, haven't been able solve it.
i have tabbar controller > navigation controller > tableview - load list of music tracks. when touches button (in extended cell area) intend load music player. earlier, trying load music player separate view found hard manage view states (even though played well), decided load music player attached subview. have been trying follow this tutorial draggable view demoed notification centre.
the view works perfectly, can drag , see whole player, etc. have 2 issues: 1. how dismiss view / end music player? (minor issue) 2. outlet connections , actions never initialized. (major issue)
since music player have title, pause/play, timeline slider, etc. i've created outlet connections / actions (that have worked previously) since followed tutorial , created separate xib, connections never initialize.
steps taken far:
- checked custom class - file owner correct still doesn't work
- checked outlet connections - they're correct
- recreated files different connection names (no copy pasting) - still doesn't work
- created cocoa touch class first , let xcode create xib me - still doesn't work
error is:
for outlets this class not key value coding-compliant key xxx
for actions (e.g. after pressing button) unrecognized selector sent instance zzz
where, xxx - label first , button , activity indicator. zzz - hexadecimal value ui component xcode assigns.
about viewcontroller: inheriting fxblurview (as in tutorial). tried inherit uiviewcontroller , still no luck. right file blank , yet outlets don't work, think issue isn't file connections xib swift file.
any appreciated.
update
i found mistake, connecting file owner, after following this, realized should first select parent view, connect outlets (of customer class) components in view via ib.
however, 2 issues still remain: 1. label , button remain uninstantiated on loading. strange reason they're nil (while other labels work fine). then, when press button, works fine , start behaving expected. tried change uninstantiated label text through action , works well, time doesn't work when class instantiates (i change label text on load). not sure why :(
- dismissing sub-view.
Comments
Post a Comment