Questions tagged [loadnibnamed]

62 questions
0
votes
1 answer

initWithFrame and loadNibNamed not working together?

I'm using Paged UIScrollView with an embedded UIPageControl like explained at https://github.com/romaonthego/REPagedScrollView. The code works fine when I use UIView *page1 = [[UIView alloc] initWithFrame:CGRectMake(20, 20, 280,…
David
  • 213
  • 3
  • 10
0
votes
1 answer

loadNibNamed at Base Class override the instance of Child Class

I have class hierachy with ParentCell extends UITableViewCell ChildCell extends ParentCell ParentCell have separate XIB, In child cell i was creating and adding only one button to one view at ParentCell XIB. but i cant add action for this button.…
Rooban Ponraj A
  • 281
  • 4
  • 20
0
votes
1 answer

Loading NIB makes status bar become completely black, and remains black

My opening screen (my main app screen) is a UIView where everything is done programatically. I wanted to use an XIB for my "settings" screen, but I am getting a strange completely black bar at the top over the status bar: I switch to it as…
Narwhal
  • 744
  • 1
  • 8
  • 22
0
votes
1 answer

Loading nib using loadNibNamed:owner:options: designate initializer

I have a nib file with its class (UIView) assigned to it in the inspector, So when I need to show that view I loaded it using the method : loadNibNamed:owner:options: So if I have to do some initialization when I load the nib, what is the way to…
MohamMad Salah
  • 971
  • 2
  • 14
  • 31
0
votes
0 answers

Custom view from NIB + autolayout

I've created a nib from which I load up my custom view with this code: NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:[[self class] description] owner:nil options:nil]; self = topLevelObjects[0]; But when I have autolayout enabled,…
Miroslav Kuťák
  • 1,875
  • 1
  • 18
  • 24
0
votes
3 answers

loadNibNamed leak of topLevelObjects

I am using custom cells and I call loadNibNamed:. This seems to cause a memory leak and I am not sure how to solve it. If I set the top level objects to nil afterwards, I still get the leak. topLevelObjects = [[NSBundle mainBundle]…
some_id
  • 29,466
  • 62
  • 182
  • 304
0
votes
1 answer

Nibs view in other nibs subview with coreplot, cpgraph takes super view as its attribute

I load a A-viewcontrollers view to other B-viewcntrollers sub view (UIview), A is having graphs with coreplot and initialize CPTgraph. When 'A' is initialize all the property of it like.:array or labels are being property of cptgraph instance so it…
0
votes
2 answers

app crash due to UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath: in iOS 5.1 Simulator

Its works fine on iOS 6 simulator. On iOS 5.1 Simulator when i run it for the very first time it get crashed due to the following exception. * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView…
Mohan Kumar
  • 334
  • 1
  • 4
  • 10
0
votes
1 answer

Custom Cell load NIb work on ios 6 but crashed on ios 5

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"CustomCell"; CustomCell *cell = (CustomCell*) [tableView…
OshriALM
  • 215
  • 3
  • 12
0
votes
3 answers

weird xib file to nib conversion issue

I was trying to add a new view controller on Xcode 4.5.2, i made the xib file to be compatible to 5.1, started playing around with it and suddenly noticed that this custom table view cell is not getting loaded at all, it was always creating a crash…
thndrkiss
  • 4,515
  • 8
  • 57
  • 96
0
votes
2 answers

A view loaded from the nib doesn't receive touch events

I am trying to load a a view from the nib and add it to the main view. Here is my code. I loaded the nib in the initWithFrame of the @interface AddTaskView:UIView: - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; …
flaviusilaghi
  • 677
  • 3
  • 10
  • 27
0
votes
3 answers

How to load a tableview cell using a different cell identifier than the one specified in the nib file

// actual question I need help in loading the nib file (tableviewcell) using a different cell Identifier than the one specified in the nib. // background on what I am doing I have a custom UITableViewCell with few labels, few images, and few…
avi
  • 57
  • 1
  • 7
0
votes
1 answer

ios: Why is a temporary load of XIB, to get frame height, corrupting memory?

I am using trying to get the heights for several UITableCellView's that are defined in their own XIB. I create a list of the heights that are used in the callback heightForRowInPathIndex of the UITableViewDelegate. When I do this, the application…
mobibob
  • 8,670
  • 20
  • 82
  • 131
-1
votes
1 answer

How do I add a subview which already has a UIView?

using the followings I can create a view and then load a nib into it: CGRect newViewRect = CGRectMake(0, self.view.bounds.size.width - 335, 335, 400); UIView *newView = [[UIView alloc] initWithFrame:newViewRect]; newView = [[[NSBundle mainBundle]…
Kourosh
  • 608
  • 2
  • 14
  • 34
-1
votes
2 answers

Objective-C / Load cell from xib / Need explanation

Ok, I know how to load a custom cell from a xib, via this code: NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustpmCellView" owner:self options:nil]; cell = (CustomCell *)[nib objectAtIndex:0]; But can someone explain what does the first…
Lord Zsolt
  • 6,492
  • 9
  • 46
  • 76