-
Ben Lings
cocoa-touch ios nib iboutlet
I have more than 20 labels that I need to update at runtime, and I was wondering if it could be possible to access them without having to declare properties and outlets for all of them. I tried to assign a unique tag to each, and access them trhough the view in my view contoller, something like this:self.view.myLabel1.text = @”Some text”;But it did not work. Is there a way to accomplish this?Thanks
-
Vincent Gable
xcode interface-builder compiler-warnings xib iboutlet
How can I have Xcode warn me if an IBOutlet of one of my objects is not hooked up to anything in a NIB?I can check that outlets are connected at runtime by adding assert(ofEveryOutlet); in awakeFromNib or viewDidLoad. But it’s not as useful, or reliable, as having the compiler do the checking for me.
-
ThinkingStiff
objective-c xcode4 nsstring iboutlet
I have a UIView extended class which has an extra NSString property. For convenience I’d like to somehow set that property in the designer, if possible.@property (nonatomic,retain) IBOutlet NSString* designerAccessibleString;The property will show up as an Outlet as expected. I connect it to an NSString Object that was added from the Objects Library (added as Plain Object, class changed to NSString). But I’m unable to edit the string through the designer Attributes Inspector… is there a way?I
-
pcperini
xcode cocoa null iboutlet automatic-ref-counting
So I’ve got an NSViewController (MyVC) set up like so://MyVC.h … @property (nonatomic, retain) IBOutlet NSTextField *input; …//MyVC.m … @synthesize input;- (id)init {self = [super initWithNibName: @”MyVC” bundle: [NSBundle mainBundle]];NSLog(@”%@”, input); //prints (null) alwaysreturn self; }- (void)loadView {[super loadView];NSLog(@”%@”, input); //still (null) } …//MyVC.xibCustom View [Referencing Outlet: File’s Owner.view]Text Field [Referencing Outlet: File’s Owner.inpu
-
Jsdodgers
arrays uiswitch iboutlet iboutletcollection
I’m using an IBOutletCollection of switches to set them disabled. After create the IBOutletCollection, I made a for cycle to set them disabled:for (arraySwitchCounter = 0; arraySwitchCounter < _switchCollection.count; arraySwitchCounter ++) {UISwitch * disabledSwitch = [ _switchCollection objectAtIndex: arraySwitchCounter ];[disabledSwitch setEnabled: NO]; }but it crash on startup, I think trouble is on second row but I don’t know what…how can I solve? Thank you!
-
user456584
objective-c ios uibutton iboutlet
Possible Duplicate:UIAlertView crashes when added to app I recently tried to delete a UIButton outlet called myButton, but I’m thinking I must have missed something because I now get the following error:this class is not key value coding-compliant for the key myButtonIf I grep the entire project, there are no remaining references to myButton, so I’m not sure how to fix the issue.How does one get rid of this exception?
-
Olotiar
objective-c ios variables uilabel iboutlet
I’m having trouble casting a string to exchange for an IBOutlet variable name in my code.I’m trying to reference an instance of an IBOutlet UILabel that was declared in the header file by programmatically creating the same variable name later on.However, when I cast an string to try & substitute for the IBOutlet UILabel variable name, the program crashes.Hopefully, the example below explains what’s happening & why needed. Sorry if the description is a little shaky – I’m a beginner.When
-
ulag
iphone ipad viewdidload iboutlet
Iv been breaking my head on this for long but im just not able to figure it out. In the view Did Load method of my view controller if i try to make some changes to an imageView connected by an IBOutlet, it is non-responsive. It simply does not respond to any changes im making to IBOutlet elements. For eg: if i have an imageView in IB and its connected thru an IBOutlet and i try to set the hidden property of this ImageView it does not respond. Why this is so is beyond me. I then added that imageV
-
kexik
objective-c cocoa-touch interface-builder iboutlet
I have a very weird problem and has not been able to solve it yet.This class is defined:@interface EngineViewController : UIViewController { } @property (nonatomic,readonly) IBOutlet GameView* vGameView; @property (nonatomic,readonly) IBOutlet MainMenu* vMainMenu; @property (nonatomic,readonly) IBOutlet CountryOverlay* vCountryOverlay; @endIn init method I have this code:if (![[NSBundle mainBundle] loadNibNamed:@”EngineViewController” owner:self options:nil]) {NSLog(@”Failed to load menu nib!”);
-
Idan
iphone ios ipad uiviewcontroller iboutlet
I have 2 xibs, one for iPad and one for iPhone. However, currently I have only one view controller for those 2 xibs that works for both iPhone&iPad.Inside my iPad Xib I have an IBOutlet that doesn’t belong to the iPhone xib. How should I define that outlet ? I notice that if I put inside my deallc method, something like this :-(void) dealloc {[outletOnlyForIpad release] }The app crashes on the iPhone. Apparently cause it doesn’t instantiates well on the iPhone. (I hoped it would stay nil, bu
-
Tony DeStefano
iphone xcode ipad uiscrollview iboutlet
I used the tabview setup to create an app that has several tabs. One tab has a UIScrollView on it which loads 12 different views into 12 pages. I tried adding a button and imageview to one of the views and now it crashes. I’ve pored over every single question on here I can find, and have tried every suggested solution, but to no avail. The error that I get is the famous “this class is not key value coding-compliant for the key foo” error. As with everyone else who had this problem, if I disconne
-
Ahmed
iphone memory-management nib dealloc iboutlet
I am making an app that has a lot of stuff in the nib file. I have a about thirty iboutlets that I connect to stuff I made in the nib. A lot of these are long scroll views with lots of text. I use both @property and @synthesize, release them all in dealloc, and set all of them to nil in view did unload. When I uconnected a bunch of the IBOutlets in the nib it worked like a charm, but obviously I need to have all those connections for the app to work. I don’t understand why having the connections
-
Boos1993
ios xcode ibaction iboutlet
I was working on my iOS app last night when I went to test it and it crashed on startup. I wasn’t even working on the nib that is causing the crash. Anyways, here is the error code:2/29/12 10:32:05.291 AM Safe Flight: *** Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<UIApplication 0xdd496f0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Airport1.’ *** First throw call stack: (0x2873052 0x33add0a 0x2872f11 0x1ae2032 0x1a
-
Wolfgang
crash iboutlet
Sorry if this has been answered before, but I didn’t find anything after searching some time. I’m used to that invoking methods of non-existent objcets leads to a crash. However, when I have some IBOutlets declared which have no connections to real objects at a xib, I can though send them messages without the event of a crash. What happens exactly?
-
LouwHopley
cocoa-touch ios xib iboutlet
I have created a TabBarView. On one of the tabs, I have a View with several Labels on it. It works fine.When I connect the Labels in Interface Builder to the File’s Owner (the corresponding IBOutlets) then the App crashes with the following error when I open that tab:2011-05-15 18:36:29.070 AeroNav[958:707] *** Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<UIViewController 0x18afe0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for
-
DonyorM
iphone objective-c cocoa-touch iboutlet
I did some research on this, but alas, no answer. I have made a code machine that uses ASCII code. There are no errors or warnings. But when I run it I get this error: Thread 1: signal SIGBART. I think it has to do with UITextView “coded” but I don’t know for sure. EDIT: The crash occurs when I click the “Encode” button ((IBAction)StartEncodeDecode).All Output Log below. Can’t believe I’m such a noob:2013-08-28 14:00:57.086 Code Machine[2285:11303] -[CMViewController decodeEncode:]: unrecognized
-
iDev
iphone ios xcode uialertview iboutlet
I am trying to impliment a basic UIAlertView into my app (I am using storyboard). But when I run my app, it goes to the debugger screen after stalling at the app’s loading screen.my .h:#import <UIKit/UIKit.h>@interface MindTripAnim :UIViewController { IBOutlet UIImageView *animation;}- (IBAction)showMessage:(id)sender;@endand my .m:#import “MindTripAnim.h” @interface MindTripAnim () @end@implementation MindTripAnim- (void)viewDidLoad {animation.animationImages = [NSArray arrayWithObjects
-
ConicaDegenere
ios variables compiler-errors iboutlet
When I run my application I get this error:Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[UIRoundedRectButton copyWithZone:]: unrecognized selector sent to instance0xcc86970’Why I get an error like this? I was careful to check all connection of IBOutlets e all IBAction. This is my code:MenuViewController.h@interface MenuViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>{}@property (nonatomic, copy) IBOutlet UITableView * table
-
DanielH
ios subview iboutlet addsubview
I am newbie in iOS development and I have a problem to understand file owner logic.I have this situations:I have two views (View_iPad, View_iPhone) and their controllers (ViewController_iPad, ViewController_iPhone). Based on a device where app is launched, particular view and its controller is used. Then, I add a subview from xib file to this view (it doesn’t matter if iPad or iPhone view is used). Let’s say that there is a different position of this subview in iPad and iPhone view. This subview
-
Robert
iphone interface-builder iboutlet
Here is what I do:1) Create New UIViewController subclass , tick with NIB for interface builder2) In the header:@interface QuizMainViewController : UIViewController {UILabel* aLabel; } @property (nonatomic, retain) IBOutlet UILabel* aLabel;@end3) In the .m#import “QuizMainViewController.h” @implementation QuizMainViewController@synthesize aLabel;- (void)dealloc {[aLabel release];[super dealloc]; }@end4) Open the NIB In interface builder, drag a new UILabel into the view.I test the program h
-
XCode Monkey
ios objective-c iboutlet lldb
This question already has an answer here:Terminating app due to uncaught exception NSUnknownKeyException – error1 answerI am coding some dummy apps to get an understanding for iOS this one such app is a TODO list. I get the following error when I click the button to add a new task. 2013-06-20 09:56:00.763 SnapTask[2322:11303] Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<SLAddTaskViewController 0x917fb90> setValue:forUndefinedKey:]: this class is not key va
-
brigadir
initialization nib nswindow iboutlet
I show modal subclassed window:NSWindowController* controller = [[NSWindowController alloc] initWithWindowNibName: @”MyWindow”]; [NSApp runModalForWindow: [controller window]];And I override initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag in my window subclass to setup children views which are linked to nib file. But these children are not initialized at this moment (are nil).Where to place my initialization code?
-
darvids0n
cocoa-touch ios loading iboutlet
Hey all. Something which has been bugging me quite a bit recently is this custom movie player I’ve put together. It’s largely based on a working one, NGMoviePlayer.The issue is this: I have the .xib in a UIKit-friendly resource bundle. When I call:[MyMoviePlayerViewController initWithNibName:@”MyMoviePlayerViewController”bundle:[NSBundle bundleWithPath:[[NSBundle mainBundle] bundlePath]stringByAppendingPathComponent:@”MyMoviePlayerViewController.bundle”]];..on my custom class, and then access th