i have used following code to parse the xml file but i can t get value...anyone can help me..?
(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName
attributes:(NSDictionary *)attributeDict {
if([elementName isEqualToString:@"Quer...
Hi, I was just wondering if this approach looks like a good practice for apps with a lot of custom views, for nested PNG graphics and animations that may change based on user interaction. I created a BaseView class that extends UIView
@interface BaseView : UIView {
@protected
BaseViewController *controller;
}
@property (retain...
The Layer-Tree and Presentation-Tree are pretty clear. But the Render-Tree is not. Since it is private API and Apple doesn't talk much about it, I would still like to know more details about what's going on there. Does anyone know?
...
I'm working on an eBook app for the iPhone. Given the time it takes for Apple to review and publish updates, I'm considering adding a feature to update the content via my own (Google App Engine-powered) web site.
This would allow me to update the content at will, rather than being at the mercy of the App Store review team. Is Apple ...
While an UIView has a memory footprint of at least 4 * width * height pixels, I wonder how that would look when I create a CALayer only.
...
The only thing that comes in my mind is displaying simple images. But that wouldn't make sense if you want to animate them, right? So is it any useful to make a CALayer only instead of an UIView that comes along with a whole bunch of them (all those trees...)?
...
I have a UITableViewController and I want to add a navigation bar to it. So after the navigation bar (which works fine), part of the original tableView is being covered up by the nav bar.
I tried to reposition the table view using this:
self.tableView.frame = CGRectMake(0, 44 + 20 /* height of navbar + some margin */, 320, 416);
But ...
The doc says:
presentationLayer Returns a copy of
the layer containing all properties as
they were at the start of the current
transaction, with any active
animations applied.
And somewhere else Apple said, that the presentation layer contains the values like they are currently displayed to the user. So when I ask for this ...
When and how is layoutIfNeeded used? I know that when we change the layout of a view, we can call setNeedsLayout to update the layout but not sure when layoutIfNeeded should be used.
NOTE: I have layoutIfNeeded used in actual code but forgot in what context it was used.
...
I would like to know about managing user's login and logout on IPhone native apps. For example, every time my app is running, the user must be logged in. The information the app serves and the list of users it's on a website running php+mysql.
What's the "standard" procedure for this? Is there any library for handling user's login on a r...
In the context of iPhone programming, I am using the GHKit for unit testing (gabriel / gh-unit on github).
Here is a failing test assertion :
GHAssertEquals(150, 15, @"someLimit");
and here is the diagnostic from GHKit (shows up in the Simulator and in the Xcode Console) :
2009-07-25 22:41:12.553 UnitTests[38404:3f07] Exception:...
I am new to objective-c and am having trouble figuring out a way to store points for multiple players in my game. I have 4 characters in my game that are all objects from the same class. 1 is controlled by the user and the other 3 are controlled by the computer. Each level in my game consists of 3 races. I need a way to keep track of eac...
I'm sure there is a better way to do this. I have this chunk of code that I use to wipe out the DocumentsDirectory on an iPhone or Simulator. Sometimes I just want a clean slate, and sometimes I make changes to a database and I need to rebuild it.
So, in one of my functions that gets called when I turn on my app, I have this code comme...
I have two entities deriving from SQLitePersistentObject.
@interface EntityA : SQLitePersistentObject {
//stuff goeshere
}
and
@interface EntityB : SQLitePersistentObject {
EntityA *fk;
}
@property (nonatomic, retain)EntityA *fk;
How do I find all instances of EntityB whose fk is a specified instance of EntityA?
...
It seems that it's not possible to play an alert sound
AudioServicesPlayAlertSound(kSystemSoundID_Vibrate);
while the AudioQueue is being used to record audio. Is that correct? Maybe I'm doing something wrong. Is there a way to do this other than pausing the recording?
TIA.
...
I have a view controller (let's call it MainViewController) that contains a UITabBarController, where each TabBarItem connecting to its respective UIViewController-derived classes. For certain UIViewControllers, I want to pass in value at the time via MainViewController. What's the best way to do this proxy'ing?
Right now, I end up ha...
Hello, I have a for loop as below which populates this data into an array.
I would like this to essentially populate 15 different array's, I have written some Pseudo code below. Is this achievable?
for (int y = 1; y < 16; y++) {
NSArray *array + y = item
}
...
I've added a text shadow to cells in my UITableView to give them an etched look:
cell.textLabel.textColor = [UIColor colorWithWhite:0.2 alpha:1.000];
cell.textLabel.shadowColor = [UIColor whiteColor];
cell.textLabel.shadowOffset = CGSizeMake(0, 1);
Since the shadow color is actually white, when a row gets selected and becomes blue, th...
I'm writing my first iPhone application and I'm having trouble switching views. I have 2 views and a reference to each in the AppDelegate (an instance of UIApplicationDelegate). I create instances of both in the applicationDidFinishLaunching and immediately show the first view. This works fine.
The problem is the reference to the o...
I have the following code
NSMutableArray *leeTemp = [[NSMutableArray alloc] init];
Player* playerLee = [[Player alloc] init];
playerLee.name = [array objectAtIndex:1];
[leeTemp addObject:playerLee];
[playerLee release];
And this generates an array of Players (I think)! When I do the following it shows the addresses of the Players.
N...