Hi,
I am creating and adding UITabBarController programatically in my appdelegate.
I am having 5 view controllers in my tab bar that means 5 views.
I want to set title of different tabs from contrller.
Plz help me in doing it.
tnx
...
Im trying to move an object around the screen like in the game geometry wars. I can rotate the object just fine, however I cant seem to get it to move based on the direction it is facing. I have this code here which i think is right for doing this but I keep getting syntax errors:
spriteObject.x = spriteObject.x + speed*cos(Angle)
spr...
NSMutableDictionary *bookmarks = [NSMutableDictionary dictionary];
[bookmarks setObject:[NSURL URLWithString:(NSString *) @"http://stanford.edu"] forKey:
@"Stanford University"];
[bookmarks setObject:[NSURL URLWithString:(NSString *) @"http://apple.com"] forKey:
@"Apple"];
[bookmarks setObject:[NSURL URLWithString:(NSString *) @"http://...
I am trying to custom render text within a UITableViewCell. This text can be over a number of lines and can contain http links, font and colour changes. I have looked at the sizeWithFont methods of NSString, but can't really work out a good way of rendering each part of the string so that it all runs together correctly.
Do I need to r...
I'm struggling with conceptualizing animations with a CALayer as opposed to UIView's own animation methods. Throw "Core Animation" into this and, well, maybe someone can articulate these concepts from a high level so I can better visualize what's happening and why I'd want to migrate UIView animations (which I'm quite familiar with now) ...
I'd like to show an overlay view similar to what you see when you perform a 'Search in Contacts app where the SearchBar is visible under the toolbar while the gray overlay covers up all of the content below.
For my view, I'd like to have an UITextField and button shown visible while the rest of screen is gray with the rest of the existi...
In my app delegate, I have this method that gets stubbed out automatically, to do something when a view controller gets selected.
If the type of the viewController is SavedViewController, then it's a UITableView subclass, and I would like to refresh the table. However, this code doesn't work:
- (void)tabBarController:(UITabBarControlle...
The browser on the iPhone is capable of using advanced web technologies introduced in HTML5. One of these is the app cache that allows web pages to run on the client, from the cache, without a connection to the internet. Together with Local Storage you can also save data permanently "in" the page.
My question is, would it then be possib...
I want to be able to take an image and blur it relatively quickly (say in 0.1 sec). Image size would almost never be larger than 256 x 256 px.
Do I have to loop thru every pixel and average them with neighbors or is there a higher-level way that I could do this?
PS: I am aware that multiple box blurs can approximate a gaussian blur.
...
How can I read and write ints from/to NSStreams? I know I can read bytes individually, but I want to take endianness into account. Java has DataStreams for these cases, is there something equivalent in Obj-C?
...
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
NSLog(@"switching views");
if([viewController isKindOfClass: [UINavigationController class]] &&
[[[viewController viewControllers] objectAtIndex: 0] isKindOfClass: [SavedViewController class]]) {
N...
I am using a UITextField to get input for a price field. Since it is for price, I wanted to make a custom keyboard for just a numpad and a decimal button. I have the keypad view setup, however, I dont' know how to disable the default iphone keyboard completely. Any ideas?
...
I want to make metallic 3d object that appears to be reflective. I want to accomplish this using an environment shader that uses either a sphere or cube map that I can assign an image or texture as the "reflection" source.
Does OpenGL ES on the iPhone support this in any versions?
...
So I have included the libxml2.2.dylib library into my iPhone XCode project to create some Xml and XPath parsing utilities. When I compile and run in Debug mode for both the Simulator and Device I have no problems, however, When I switch to Release mode I get...
"error: libxml/tree.h: No such File or directory" as well as other simila...
Hi,
Given that the mapkit doesn't provide forward geocoding functionality today, can anyone provide help on how I can i use a search bar to return a latitude and longitude coordinate from a user inputted address today. If someone can provide sample code that would be great.
Zap
...
I have a method where I do some startup animations. The method gets called many times during usage of the app, but on it's first call it needs to do some special things in addition.
Are Singletons the way to go? Maybe there is also an better way, instead of measuring how many times this method was called, and storing that in an ivar.
...
Some methods of my class need to know how many times the class has been loaded. Do I need a Singleton for this, or are there other ways to do this? Are there static variables that I can attach to the class and then just increment them every time a viewDidLoad?
When the application starts, that value is resetted (=0). I'm not such a big ...
In my app, I create a directory, and then the following code works:
NSDictionary *fileAttributes = [fileManager fileAttributesAtPath:trackDirectory traverseLink:YES];
NSDate *fileDate = [fileAttributes objectForKey:NSFileModificationDate];
However, when I try and get the NSFileCreationDate instead, it doesn't work.
What am I doing w...
I have an array of booleans (soundArray) that is modified based on user input. Therefore it is owned by the main UIView that the user is interacting with. Meanwhile, in another separate controller (GestureController), I need access to this soundArray, so I can pass it as a parameter in a method call.
I'm pretty sure a ViewControlle...
Hi,
I am having difficulty geting a very simple view to display. This view has a custom view controller that is manages by a switching view controller. The XIB has one UIViewController component on it with its Image property set. The view controller is as follows:
InstructionsViewController.h
#import <UIKit/UIKit.h>
@interface Instru...