Questions tagged [loadnibnamed]

62 questions
1
vote
2 answers

loading a nib on a background thread

I just spent a day tracking down a really weird bug. It was a UILabel being overreleased, although in the code there was no over-releasing. If I commented out the release of the label, code was fine. I tracked it down to a UIView that was being…
bandejapaisa
  • 26,576
  • 13
  • 94
  • 112
1
vote
2 answers

How to programmatically change label in UIView created in a nib file?

I have trouble changing the text in a label programmatically. When I run the following code, NSLog does display "Setting myLabel to = Hello World!", but the label on the screen is not changed. UIViewOverlay *overlayWindow; overlayWindow =…
AReality
  • 69
  • 1
  • 11
1
vote
1 answer

loadNibNamed returns the view, not "the view"?

I have a small xib, Teste.xib owned by TesteView class TesteView: UIView { @IBOutlet var tf:UITextField! @IBOutlet var sw:UISwitch! } Now, we're gonna load it (and for example stuff it in a stack view). let t:TesteView =…
Fattie
  • 27,874
  • 70
  • 431
  • 719
1
vote
1 answer

Crash when loadingNibNamed in for loop

This is in continuation to the following question https://stackoverflow.com/questions/39673003/crash-on-multiple-calls-to-loadnibnamed Basically i am calling [[NSBundle mainBundle] loadNibNamed:@"YFCalendarDayCell" owner:self options:nil]…
LeXeR
  • 214
  • 3
  • 20
1
vote
1 answer

button load from xib via loadNibNamed() never called

Another problem arrived me. I have a view covering my hole screen. In it a webView for showing a youTube video and a button for closing. The view is load via loadNibNamed() and no matter what I'm doing, my IBAction never called by pressing that…
kuemme01
  • 472
  • 5
  • 19
1
vote
1 answer

Only white rectangle appears after adding a subview

I'm trying to add a subview with this code: NSArray *subviewArray = [[NSBundle mainBundle] loadNibNamed:@"subView" owner:self options:nil]; SubView *subView = [subviewArray objectAtIndex:0]; [self.view addSubview:subView]; But only a white…
Display Name
  • 4,502
  • 2
  • 47
  • 63
1
vote
1 answer

Position of Nib-loaded Subview incorrect in iOS 8

I have a custom class called CNJobMapView which is a subclass of UIView. This custom class loads a view from a nib file and adds it as a subview. I do this so that I can add a UIView object to a view in a storyboard, give it the CNJobMapView custom…
BreadicalMD
  • 336
  • 1
  • 16
1
vote
0 answers

Auto layout disappear after several loadNibNamed calls

I have one UIViewController that loads several other UIViews inside of it INFO : UIViewController don't have .xib, is only to control and load the UIViews. UIViews : loaded by .xib (i'm reusing the same .xib for every UIView that i need) <<…
silvaric
  • 1,668
  • 17
  • 27
1
vote
2 answers

iOS SDK using loadNibNamed, code within 'init" not working as expected

FluidInfo *fluidInfo = [[FluidInfo alloc]init]; UIView *info = [[[NSBundle mainBundle] loadNibNamed:@"FluidInfoSheet" owner:fluidInfo options:nil] objectAtIndex:0]; [self createFormulaPopup:info]; I have a nib file with a UIView. and I have a…
hamobi
  • 7,940
  • 4
  • 35
  • 64
1
vote
0 answers

Dynamically Loading a View

I am having a strange issue when attempting to dynamically load a view. The error I get is as follows: * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)'…
Mick Walker
  • 3,862
  • 6
  • 47
  • 72
1
vote
1 answer

Xcode 4: Loading a Nib in a method in a different file

sorry if this question is elementary, but I've been stuck on this bug for the past 2 days & I haven't been able to get past it. I'm using Xcode 4.3.2 I'm trying to load a nib named AController.xib in a method called "- (void) process" in the file…
Henry
  • 926
  • 2
  • 12
  • 27
1
vote
1 answer

Custom UIView created by loadNibNamed:owner:options: leaks after removeFromSuperview

I have application where I want to show my CustomView (inherited from UIView) with some content. But I don't need it at each point during runtime so I would like to create it and also delete it to avoid wasting with memory. I have this view in…
D33
  • 239
  • 1
  • 3
  • 14
1
vote
1 answer

loadNibNamed vs. initWithFrame dilemma for setting frame's height and width

I created a UIView subclass associated with .xib file. This UIView subclass is to be used in a UIViewController. In the controller, I think there are two options how we instantiate the UIView subclass: MyUIView *myView=[[MyUIView alloc]…
0
votes
2 answers

Instance variable used while 'self' is not set to the result of '[(super or self) init…]' via Analyzer

When i test my code via Analyzer then got: Instance variable used while 'self' is not set to the result of [(super or self) init…] My code: self = [super init];//initWithFrame:frame]; if (self) { tickerSymbol = [object…
avinash
  • 611
  • 1
  • 7
  • 22
0
votes
1 answer

Custom UITableViewCell, autorelease and other method

(sorry for my english :-) I'm loading a custom UITableViewCell: static NSString *CellIdentifier = @"ReminderCell"; ReminderCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { NSLog(@"Alloco nuova…
LombaX
  • 17,265
  • 5
  • 52
  • 77