Using OpenGLES 1.1 on the iPhone 3G (device, not simulator), I do normal drawing fun. But at points during the run of the application I get giant memory spikes, after a lot of digging with instruments I have found that it is glDrawElements that is grabbing the memory.
The buffer being allocated is 4 meg, which to me means its loading a ...
Hi guys,
obj-c question. I have text that I parse that contains CDDATA (html amp chars etc). Now, is there a way to render it on the UI with some control, locally, and secondly, is there a clean way of editing it (converting it perhaps from cddata to text in a textarea)?
...
can anyone tell how to declare and change global variables in objective c
...
I have an OpenGL application which is rendering intensive and also fetches stuff over HTTP.
Following Apple's samples for OpenGL, I originally used NSTimer for my main painting loop, before finding out (like everyone else) that it really isn't a good idea (because you sometimes have huge delays on touch events being processed when slow ...
Are there any issues I may be missing using fastEnumeration with the enumerator below? I only ask as code examples (online & books) always seem to use a whileLoop. The code sniped works fine, just curious if I am missing a potential issue. Please not this is just a test with no error checking.
NSDirectoryEnumerator *dirEnum;
NSString *...
I want to add the three button in the right side of navigation bar, i dont know how to add pls help me.
...
At the CocoaHeads Öresund meeting yesterday, peylow had constructed a great ObjC quiz. The competition was intense and three people were left with the same score when the final question was to be evaluated: How many reserved keywords does Objective-C add to C?
Some spirited debate followed. All agreed that @interface, @implementation et...
I use this tutorial for integrating MapKit to my application:
http://iphonebcit.wordpress.com/iphone-map-kit-tutorial/
CLLocationCoordinate2D coordinate;
coordinate.latitude = 49.2802;
coordinate.longitude = -123.1182;
NSUInteger count = 1;
for(int i = 0; i < 10; i++) {
CGFloat latDelta = rand()*.035/RAND_MAX - .02;
CGFloat longDelta...
I'm following a tutorial about playing sound with OpenAL. Now everything works fine except I can't make the sound looping. I believe that I've used AL_LOOPING for the source. Now it can only play once and when it finishes playing, the app will block(doesn't response to my tap on the play button). Any ideas about what's wrong with the cod...
Hi, I made two version of my library to fit different platform as device and simulator
How to make xcode automatically choosing the correct platform lib(.a)
with the config of the target's "Base SDK" ?
and By using the same header files.
I know Admob could do this without any modify but configuring the Base SDK.
...
hello, i have a UIViewController class that do the following:
detect movement.
array a bunch of images and do some orders manipulation.
insert images to the view.
animate some images.
btw there are a lot of objects in the class (60).
do i need to separate some of this steps to different classes ?
if so why and to which class type.
t...
I'm writing an iPhone application which needs to have an option to call our office. However, the phone number that needs to be dialed has a 5 digit extension.
I know that to call a regular phone number we can use openURL using something like:
[[UIApplication sharedApplication]
openURL:[NSURL URLWithString:@"tel:1-800-555-5555"]];
...
Are there any Cocoa classes that will help me convert a hex value in a NSString like 0x12FA to a long or NSNumber? It doesn't look like any of the classes like NSNumberFormatter support hex numbers.
Thanks,
Hua-Ying
...
I have a "to->many" relationship in Core Data with no inverse relationship and the delete rule set to both "Nullify" and "No action" (by that I mean I've tried both with no avail)
Basically I have a MergedStation whose property subStations points to many Station objects: MergedStation.subStation -->> Station
When I call [mergedStation ...
Hi,
I'm trying to make a window open when the user pressed Cmd + L but how can I make my controller object listen to that particular key combination?
...
Following is my code:
.h file:
#import "Foundation/Foundation.h"
@interface GObject:NSObject{
NSTimer* m_Timer;
}
@property(nonatomic, retain) NSTimer* m_Timer;
- (void)Initialize;
- (void)TimerCallback:(NSTimer*)pTimer;
@end
.m file:
@implementation GObject
@synthesize m_Timer
- (void) Initialize{
self.m_Timer = [NSTimer...
Do I have this right ...
To manipulate files on disk (create, copy, rename etc.) you use NSFileManager
To manipulate file contents (open, read, close etc.) you use NSFileHandle
I just want to make sure I am understanding this right.
EDIT_001
Thanks, thats what I figured Joshua, so I am assuming that by using the example below, open...
By default, UIDatePicker displays today's date in a blue font and the rest of the dates in black.
How can I make it so that all the dates are black?
...
In the book, "Cocoa Design Patterns," the author sometimes declares a property in the @interface as readonly:
// .h
@property (readonly, copy) NSArray *shapesInOrderBackToFront;
and then later adds an unnamed category to the implementation (.m) file like this:
// .m
@interface MYShapeEditorDocument ()
@property (readwrite, copy) NSAr...
So I have a function in an app that needs to let the user calculate a trig function (sin,cos,tan) using radians OR degrees, and also to expect a returned value from inverse trig functions (asin,acos,atan) as either radians or degrees. is there any way to do this without building in a converter directly into the way they input something?...