Hi, I was looking forward to find a cause for my application being crushed at some point and I found out that methods of UITableView are being called before or at the same time as viewWillAppear is called.
In viewWillAppear I have code that is initializing number of rows in each section but numberOfRowsInSection is being called before I...
Hi,
I cannot find a problem in my code. At some point it is throwing an exception. When I am showing a view and after that it is being disappeared (going to another view) and after that entering the previous view again it is throwing an exception which I cannot understand.
And when I am scrolling my tableview sometimes an exception is b...
Hi friends,
i created a UITextField of type rounded textfield, using Interface Builder,so in order to set the Height of a textfield its window was disabled(not to set any height manually) in SizeInspector.so if we want to set height manually,what procedure should we follow.
One thing i would like to mention is ,we can do that in coding...
Hi, when I try to release a dictionary I get an exception.
Here is my code:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (!tableDataDictionary)
{
DebugLog(@"initializing tableDataDictionary");
tableDataDictionary = [ [NSMutableDictionary alloc] init];
}
}
-(void)viewWillDisappear:(BOOL)animated...
I have a grouped table view that utilizes two different custom table cells.
When i scroll through the table so that one (or more) of the cells goes either above or below what is visible those cells become blank. When i scroll back up (or down) to view these cells they are still blank. Why is this? The cells showed the appropriate con...
I have a property that changes to invalid as I move between viewDidLoad and viewWillAppear. I have no idea why that happens.
I have a helper class that gets the path to my database. I alloc this class in the app delegate. RootViewController gets a reference to the appDelegate like this:
//inside .h file
@interface RootViewController...
I would prefer to create my interfaces programatically. Seems as if all the docs on Apple Developer assume you're using Interface Builder. Is it possible to create these interfaces programatically, and if so where do I start learning about how to do this
I thought the relevant document for this, if possible would be in this section: ht...
I'm trying to build for multiple targets in Xcode, to simplify the process of creating a "lite" and "pro" version of my application. In theory, this is great and I can pass defines to GCC_PREPROCESSOR_DEFINITIONS for use in my code. However, I'm having problems actually getting it to work due to an error trying to launch the second tar...
Hi,
When I am scrolling my table way too down, application crushes. And I cannot find where the error in code is.
Here is my code:
NSMutableDictionary *tableDataDictionary;
NSInteger *rows_in_section;
-(void) initView
{
if (!tableDataDictionary)
{
tableDataDictionary = [ [NSMutableDictionary alloc] init];
}
[sel...
The 1992 to 1993 timeframe was pivotal and fateful for C++.
In the '92/'93 time frame I worked on a plugin architecture for Aldus PageMaker, which was coded in C++. PageMaker was built on a C++ OOP framework called VAMP, which assisted its portability between Mac OS and Windows.
So we tried to use the features of C++ to build a plugin ...
With all the URL-handling objects lying around in the standard Cocoa libraries (NSURL, NSMutableURL, NSMutableURLRequest, etc), I know I must be overlooking an easy way to programmatically compose a GET request.
Currently I'm manually appending "?" followed by name value pairs joined by "&", but all of my name and value pairs need to be...
I have a UIScrollView with images in it. When the user reaches the last image and swipes the finger for next image, I want to show the first image. Similarly, when the user is at the first image and swipes for previous image, I want to show the last image. In short, it will be a circular sort of a thing.
How can I implement this?
...
I am trying to make NSTableDataSource compatible object and give this object to NSTableView as DataSource, however when table tries to display data, it crashes.
@interface NSArrayDataSource : NSObject{
NSArray* internalArray;
}
-(id) initWithArray: (NSArray*) objects;
-(int)numberOfRowsInTableView:(NSTableView *)aTableView;
-(id)ta...
Hi, in my application I am getting an exception: MyApp(38431,0xa004ffa0) malloc: *** error for object 0xa08be760: pointer being freed was not allocated
Is there a way for XCode to show me where this pointer is? How can I find where the problem is?
I know that I can type info line*[address] and it may show me where the line is. But now ...
All of the examples of categories that I've seen use some Objective-C class rather than a custom class. For example: NSMutableArray, NSArray, NSString. I'd like to create a category for a custom class. Here's a useless example I created just to test but fails compilation:
//person.h
@interface Person (aCategory) : NSObject {
NSString...
I have never programmed on a mac; i did program on a NeXT machine using objective-c tho. I want to learn to develop iphone apps what is the recommended optimal (read lowest cost versus best developer experience) hardware to buy from Apple for iphone development?
thank you in advance.
...
I have perfect 2D and 3D animation team. And we are starting iPhone game developing.
So i need something to get started... something like newbie guide, open source engine with good documentation...
So where is the starting point ?
And one more question - is it hard to start if i am Java developer and almoust n00b in Objective C ?
...
Hi, I have a trouble in my database - somehow at some point it appears that a database is being closed even before it was opened.
If a database was not opened I am using the following statement: if (!database) then break;
when *database is being set to nil (database = nil) when it was not opened.
Am I doing it in a right way? Or there...
I have a UIViewController subclass that accesses self.navigationController in viewDidLoad:. Depending on where it is in the view stack, I will either get the navigationController or I will get nil.
If my stack is "RootViewController -> MyViewController", I get a valid pointer.
If my stack is "RootViewController -> AnotherViewControlle...
Hi all,
I'm trying to understand how strategies some folks use to distinguish instance vars vs. properties. A common pattern is the following:
@interface MyClass : NSObject {
NSString *_myVar;
}
@property (nonatomic, retain) NSString *myVar;
@end
@implementation MyClass
@synthesize myVar = _myVar;
Now, I thought the entire prem...