ios - Can't link connector from IBOutlet to View Controller -


i have created files aviewcontroller.h , aviewcontroller.m, view controller - have set custom class of view controller aviewcontroller.

i have object defined in aviewcontroller.h, instance of class b as:

@property (weak, nonatomic) iboutlet b *object_b; 

i want able link iboutlet view controller, can use call functions of class b display things on view controller. however, i'm not able - trying drag line object view controller nothing. there no errors or yellow warning symbols next object. tried doing view controller object well, , tried menu in storyboard.

should view controller renamed 'aviewcontroller'? have other view controllers had names different custom classes , didn't have linking problems.

i tried solutions from: xcode 6: can't connect iboutlet viewcontroller , error in xcode 6 - view controller not have outlet named (subview), didn't work.

i'm using xcode 6.2

it's annoying problem; there discussion in previous questions bug report, i'm not sure if solved. appreciate help!

as long class "b" not view controller, should pretty easy. first step go storyboard or related .xib file , find view controller corresponds "aviewcontroller." then, find little yellow circle white square inside of (top of view controller) , control+click on that. should see black box pop up. (see attached image). in box, there should section called "outlets." see line below related "b" object? if so, drag white circle on right side of line object represents "b" class on view controller. wire up.

if not have entry "b" in black box, wrong setup of view controller.

if have entry "b" in black box, can't connect view controller, take following steps: make sure have object of class "b" on view controller in storyboard. if don't, that's problem. if do, still can't work, need set class type of object in storyboard. that, click on object on storyboard , in right panel in xcode (screen shot #2 below). in panel, click 3rd icon on (it looks little square). there see says "custom class." if under "class" not "b", that's problem right there. , if problem, set class "b" , try wiring outlet again steps outlined in first paragraph of answer.

enter image description here

enter image description here


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -