我的目标是从单独的视图控制器(在不同的选项卡中)更新 UIView 的绘图,因此我为其创建了一个出口:
@property (strong,nonatomic) IBOutlet GraphView *graphview;
(并合成了它)。
但是,我无法将此插座连接到我想要在情节提要中访问的视图。我尝试控制从 DataController.h 文件拖动到情节提要中的视图,反之亦然,但它没有设置。
编辑
澄清我的主要目标,在我的标签栏应用程序中,我需要从 Tab1 内的视图控制器访问 TAB2 中 scrollview 内的视图,以便每次向核心数据上下文添加值时进行更新。
My goal is to update a UIView's drawing from a seperate view controller (in a different tab) so I created an outlet for it:
@property (strong,nonatomic) IBOutlet GraphView *graphview;
(and synthesized it).
However I cannot connect this outlet to the view I want to access in storyboard. I tried control dragging from the DataController.h file to the the view in storyboard and the other way around and it's not setting.
EDIT
clarifying my main goal that in my tab bar application, I need to access a view inside a scrolview in TAB2 from a view controller inside Tab1 in order to update everytime I add a value to the core data context.
发布评论
评论(1)
IBOutlet 是 Interface Builder Outlet,它们仅适用于与特定 viewController 关联的视图中的对象。您究竟想更新什么?
IBOutlets are Interface Builder Outlets, They are only for objects that are in the view associated with that particular viewController. What exactly are you trying to update?