Hello,
I've created a UIButton on a view and on action of the UIButton[UIButton* button1_obj] one more button[UIButton* button2_obj] is created on same view.
i'm facing these 2 issues...please guide me how to proceed.
button1_obj is appearing when i run my project, but its not being clicked or highlighted, nor any exception is thrown...
My code is
-(UIImage *)addText:(UIImage *)img text:(NSString *)text1
{
int w = img.size.width;
int h = img.size.height;
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGContextRef context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst);
CGContextDrawImage(cont...
Does anyone know how, in Objective-C on the iPhone, to bring up a keyboard with a search bar connected to the top of the keyboard?
...
** STILL NOT WORKING **
I am using below formula to move the ball circular, where accelX and accelY are the values from accelerometer, it is working fine.
But the problem in this code is mRadius (I fixed its value to 50), i need to change mRadius according to accelerometer values and also i need bouncing effect...
I have class1.m . I declared a method and written in it. Now i need to call it into another class. How can I make it? Can we use extern for it like we use for variables.
Thank you.
...
Hi, as a Mac outsider it seems that two popular programming languages on the Mac appear to be Objective C and Ruby.
From what I understand the main API Cocoa seems to be written in and optimized for Objective C, but it is also possible to use Ruby for that.
Are there different areas where each language is ideal, for example, I could im...
For some reason the NSButtonCell for my table view is passing the wrong object as a parameter. I am trying to read the tag of the NSButtonCell after it is clicked.
Here is a simplified version of my code:
- (int)numberOfRowsInTableView:(NSTableView *)aTableView {
return 3;
}
- (void)tableView:(NSTableView *)aTableView willDisplayC...
I'm trying to read property name but I'm not shore how.
Is it possible in ObjC to get string "theProperty" from self.theProperty?
I know how to read all properties (with "class_copyPropertyList") and their names (with "property_getName") but couldn't find a way to do something like:
NSString *text = [self.theProperty somehowReadTheProp...
I'm currently testing a new version of an app of mine on OSX 10.5
An user reported some weird crashes during use of the application, sadly not reproducible by me. At first sight it seems to happen randomly, once he had the crash while opening an NSOpenPanel and once during focusing an NSTextField and once during NSView switch in a parent...
I develop with Actionscript and was glad to see that AIR 2.0 was going to give access to mic input data. I planned to use this to create a visualizer set to the tempo of the incoming live audio. After doing a few days of google research it seems unlikely that it will be possible to analyze the data of the mic input in Flash/AIR. If anyon...
I have multiple UITextViews with corresponding .txt files. I'm reading them with NSString's
stringWithContentsOfFile
but I don't know the path where I should put my files. If I put it to /tmp/ on my Mac, it works in Simulator, but, of course, doesn't work on the actual device. So where should I put the files, so they'll work on both Si...
Hello, I'm trying to read EXIF data from pictures taken with the apple camera's application, containning EXIF informations. I use iphone-exif library available at http://code.google.com/p/iphone-exif/.
My problem is that I succes getting tag informations with [exifData tagDefinition:] function :
EXFTag* tag = [exifData tagDefinition:[N...
Would you call this implementation of a multiton in objective-c 'elegant'? I have programmatically 'disallowed' use of alloc and allocWithZone: because the decision to allocate or not allocate memory needs to be done based on a key.
I know for sure that I need to work with only two instances, so I'm using 'switch-case' instead of a map....
In my application I needed something like a particle system so I did the following:
While the application initializes I load a UIImage
laserImage = [UIImage imageNamed:@"laser.png"];
UIImage *laserImage is declared in the Interface of my Controller. Now every time I need a new particle this code makes one:
// add new Laserimage
...
I've done an adhoc build to test an application, but when I drag it into iTunes to add to my devices it is getting a corrupt name. It comes up with the name
"Myapp Name <!DOCTYPE plist PUBLIC "-//APPLE//DTD PLIST 1.0//EN" http://www.apple.com/DTDs/PropertyList-1.0.dtd">" which continues with the whole plist
I've tried the obvious, cle...
hi, i have 2 UIImage and a UISwitch, when the switch is on, image 1 appear and when the switch is off the image 2 appear... any ideas? thanks
...
Hi everyone,
I try to get the last modification date of a file:
NSFileManager *fm = [[NSFileManager alloc] init];
NSError *err;
NSDate *lastModif = [[fm attributesOfItemAtPath:filename error:&err] objectForKey:NSFileModificationDate];//filename is ok ;-)
if(err == nil) {
[lastModif retain];
//I can put a NSLog of lastModif here...
Hi, im working on a nstableview that contains information for some properties that are dynamicly created. Each row contains some cells that are common (name for example), but in one column they have different cells. Some properties will have NSSliderCell, other NSButtonCell etc. All of this is binded up to a NSDictionaryController. I've ...
Hi All,
I want to show pop up of question with it's options.
Each question have 3 options.
Currently the text is not fitting in the UIAlertView.
My UIalertView is in landscape mode.
my questions are,
1) How to change the font and font size of UIAlertView message and Button?
2) How to increase the height and width of UIAlertView?
OR...
I am writing an audio player for OSX. One view is a custom view that displays a waveform. The waveform is stored as a instance variable of type NSImage with an NSBitmapImageRep. The view also displays a progress indicator (a thick red line). Therefore, it is updated/redrawn every 30 milliseconds.
Since it takes a rather long time to rec...