I have an app based on Apple's PageControl sample. The first time the view loads, the scroll view is loaded with page 0 and page 1. Whenever a scroll is initiated, the scrollViewDidScroll method should get called by UIKit correct?
When initiating a scroll from page 0 to page 1, the app should load page-1, page and page+1, (to prevent fl...
I am really not sure why this is happening because I have similar logic all over my program but for some reason the following code seems to be where my app is crashing
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSInteger row = [indexPath row];
LessonRunViewController *lessonRunView = ...
I create/push my ViewController, display some informations and navigate back to my RootViewController. While I navigate back the app crashes (EXC_BAD_ACCESS).
With Instruments I found out that the dealloc of my ViewController is called, which releases my wrapper class. In my wrapper class also the dealloc method is called. This dealloc ...
I have a program that gets a KERN_PROTECTION_FAILURE with EXC_BAD_ACCESS in a very strange place when running multithreaded and I haven't the faintest idea how to troubleshoot it further. This is on MacOS 10.6 using GCC.
The very strange place that it gets this is when entering a function. Not on the first line of the function, but th...
Still "somewhat" of a newbie... I have an NSMutableArray that stores filenames - when a user clicks a UITableView the corresponding selected cell will pass the certain filename in the array to MPMoviePlayerController to play. It works, however if I exit out of the viewcontroller and come back, only the last video that I played will work,...
I am getting confused with how to handle Integers in Objective C.
If I define the following:
NSInteger i = 6;
NSLog(@"%d", i);
I expect it to print 6 to the console.
however I have an NSInteger within an object which is obviously reference by a pointer so I get very difference results.
For example:
@interface Section : NSObject {
...
Hi all,
I have a very simple application that use a 2 component UIPickerView that causes me a crash every time I click over it. I dragged it into my view by IB, then hooked up dataSource and delegate to File's Owner. In the .h file:
@interface SettingsViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate> {
W...
I'm declaring an array of primitives on one of my objects, and cannot seem to access it from the outside. I'm fairly new at ObjectiveC, is there some obvious mistake I'm making?
header file:
@interface MyObject : NSObject {
//@public <-- this shouldn't be necessary, right? I have accessors!
float *d;
}
@property float *d;
...
Hi,
I am using AdWhirl in my app and got a suspicious crash mid-game.
It appears to crash in the animationDidStop:finished: function which I didn't create.
Could this be a bug in AdWhirl?
I can't find this file referenced in the log:
(MMHTMLAdView.m:123)
This is the log:
Date/Time: 2010-10-21 09:54:14.861 +0200
OS Version: ...
I am parsing Json Data into an NSDecimalNumber as follows
product.Price = [NSDecimalNumber decimalNumberWithDecimal:[[jProduct
objectForKey:@"Price"] decimalValue]];
This is in a loop with each product being added to an array. At the end I release the json object.
If I Log the value of product.Price during the loop the value is corre...
This is sort of a mystery to me. My application does not use very much memory but if I put it in the background and run as many memory-intensive applications as I can, occasionally my application will crash when I try to wake it up.
I've looked at the crash log and this is what I see:
0 libobjc.A.dylib 0x000027da ...
I am having trouble loading from saved data an instance of a custom class that conforms to the NSCoding protocol. My class has a UIImage property and when I assign a new UIImage to it the program crashes with an exc_bad_access.
In the view controller I declare my object like so:
@interface SomeViewController : UIViewController {
...
Update: problem magically disappeared, see comment
I have a function which works fine on an iPhone 3G, iPhone 3Gs and simulator but crashes on an iPod touch 2nd generation.
- (id) initWithDelegate:(id) delegate
data:(NSData *) data
finishSelector:(SEL)finishSelector{
if(self = [super init]){
_delegate = dele...
Hi
My iPhone app is crashing and getting EXC_BAD_ACCESS error when using this code:
NSError *error;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); //1
NSString *documentsDirectory = [paths objectAtIndex:0]; //2
NSString *path = [documentsDirectory stringByAppend...
I get an error with the following code. Essentially the app confirms calling the number when it is selected from the table view. The EXC_BAD_ACCESS is coming in when the ViewContoller with this alert is dismissed.
It only happens if the alert is triggered. It does not if the table is only viewed with no selection. That tells me I am doi...
I have having a very odd issue when utilizing this UIAlertView. When viewing a Physician they have several offices. Upon selecting one you get an alert that offers to call this location or display it on a map. To create the alert and to have data at the ready when the alert is dismissed, I declared 4 NSStrings (although I probably only n...