I was trying to track a strage memory allocation bug so I overrode the retain and release methods of my class. I noticed that when assigning an instance of this class to a property of another, the retain count of the object increased, but my redefined retain was never called.
How can this be possible? Are (retain) properties retaining t...
I am trying to make an app where the user clicks a button and an alert pops up with the text from a textfield in it. But whenever i try, i just get a blank alert. This is my code:
@synthesize label;
@synthesize textBox1;
@synthesize text;
- (IBAction)buttonClick {
UIAlertView *someText = [[UIAlertView alloc] initWithTitle: @"Text fr...
I have a UISearchDisplayController that is properly hooked up in IB.
delegate = Files Owner
searchBar = Search Bar
searchContentsController = Files Owner
searchResultsDataSource = Files Owner
searchResultsDelegate = Files Owner
When my UITableView calls numberofRowsInSection the correct number is returned.
However, my cells in cellFo...
greetings Cocoa masters - this simple issue has me crawling the walls. I have a custom class called Movie which consists of a bunch of properties and a few collections. I am populating it successfully using FMDB and SQLite. However, with each pass through the result collection from the DB, my addObject: seems to be writing over the entir...
Is there a built in function or a way to query the size of an emun typedef?
typedef enum difficultyTypes {
kEasy,
kMedium,
kHard
} difficultyType;
I would like a way to query and have it ( in this case ) return 3.
I could even deal with it returning 2 as the highest value ( 0,1,2 ).
Or am I forced to use another int variable that I s...
Alright, I have some weird behavior and this question goes to the people out there that got that issue already.
I have 4 different subclasses of UITableViewCells. They are all very similar (I can't see the differences that would bring the problem up).
Now my UITableView's delegate have the following code:
- (UITableViewCellEditingStyl...
I am just starting out with iOS programming. I'm currently looking through the MoveMe example and had a question about event handlers. In the example, they have the MoveMeView (subclass of UIView) handle events (touchesBegan:withEvent:, etc.). It seems like this belongs on a controller though, not the view. Is there a standard way of doi...
I have UITableViewController subclassed and implemented the following
NSFetchedResultsController with its delegates
tableView:sectionForSectionIndexTitle:atIndex:
tableView:titleForHeaderInSection:
In controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:
case NSFetchedResultsChangeMove:
[tableView deleteRowsAtIndexP...
I want to implement a delayed 'enlarging' animation on an UIView that is being dragged using an attached UIPanGestureRecognizer.
I've been using something similar to the following code:
UIView* innerView;
CGPoint startingPoint;
- (void)viewDidLoad {
innerView = [[[UIView alloc] autorelease] initWithFrame:CGRectMake(0, 0, 200, ...
I am implementing UIPickerView so that the user can select one of 5 answers. Each answer, by default, has its own row. The problem I'm running into is that the majority of answers contain more text than just one row. This results in displaying a brief introductory phrase interrupted by an ellipsis. I need the text to wrap onto subsequent...
my code:
for(var myLine = 0; myLine < 100; myLine++)
document.getElementById("myDiv").innerHTML += "line " + myLine + "<br>";
...............
<div style="position:...etc; overflow:auto;" id="myDiv"></div>
this works without a glitch in every browser on all non mobile platforms. However... when this is implemented on iPhone (...
Is it possible to trigger the execution of a method within an iPhone application from Javascript on a web page?
For example, I'd like to have a button that opens the iPhone camera application. Is this possible?
...
Hey all, I have a problem and I'd like some advice.
I'm working on a document viewer that's composed of the following major parts:
zip library which unpacks the document container (minizip)
xml library which parses the document (libxml2)
UI code which renders the document on screen
Nothing too complicated or fancy.
On the emulato...
My test code:
NSManagedObjectContext *context;
.....
NSAutoreleasePool *pool = [NSAutoreleasePool new];
User *u = (User *)[NSEntityDescription insertNewObjectForEntityForName:@"User" inManagedObjectContext:context];
NSLog(@"after create:%d", [u retainCount]);
[context deleteObject:u];
NSLog(@"after delete:%d", [u retainCount]);
[context...
I am working on making an application that will store information, and for user convenience I'd like to make it possible for them to use Spotlight (scroll to the left until search appears on the home screen) to search for items in the app.
Is this possible, and if so, can you point me to a reference? I have had no luck in finding this, ...
Hello everyone
I use codes below to play ipod audio library.
if( musicPlayer==nil)
{
MPMusicPlayerController* playa=[[MPMusicPlayerController alloc]init];
musicPlayer=playa;
[ playa release];
}
musicPlayer = [MPMusicPlayerController applicationMusicPlayer];
[musicPlayer setShuffleMode: MPMusicShuffleModeOff];
[musicPl...
In data model I have transient property uppercaseFirstLetterOfName which will return first letter of persistent property. I specify this property in
NSSortDescriptor* sortByWordDescriptor = [[NSSortDescriptor alloc]
initWithKey:@"subject" ascending:YES];
NSArray* sortArray = [[NSArray alloc]
ini...
Hi, i have the "The executable was signed with invalid entitlements" error. The error only occurs when im trying to set TRUE to the Entitlements.plist of get-task-allow. The reason for trying to do this is because im trying to get the device token to be shown in the console, using the device token later for push notifications.
Though, ...
I have found something I don't understand with the UIPicker and UIDatePicker views - when I make a view with either of these, centered at the top of the view, I set it horizontally to have all the auto resize options selected (Looks like: H<-->H in interface builder, third tab of the inspector in the red box).
This works as expected whe...
I am new to iphone programming. using google code iphone-exif, i can read/write images tags also i can add custom image tags. But, my problem is that how can see the updated data??? OR is there any way to save image with updated data??
I have used .jpg image from net, is in other resources folder.
Here my code (.m file)
NSString *file...