I was surprised not to find an answer to this question, maybe is something very simple I somehow overlook :
How to get the real size of an UIView after I apply a CGAffineTransform to it?
eg.
my UIView has size 300 x 200, I apply a scaling transform let's say factor 2 both horizontal and vertical, so the UIView now takes 600 x 400 on...
I have an array of NSDictionaries. How can I pull out the first element in the dictionary?
NSArray *messages = [[results objectForKey:@"messages"] valueForKey:@"message"];
for (NSDictionary *message in messages)
{
STObject *mySTObject = [[STObject alloc] init];
mySTObject.stID = [message valueForKey:@...
How to succinctly handle this situation. I'm not properly releasing contactDictionary in the if statement...
NSNumber *pIDAsNumber;
...
NSMutableDictionary *contactDictionary = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:kContactDictionary]];
if (!contactDictionary) {
con...
This actually could be a multipart question. But here's the first part ...
I have an array (actually in a plist) of dictionaries. Each dictionary has 3 keys in it: (title), (points), and (description).
I am trying to make a NEW array with the values of the key "title" from each dictionary in that first array.
Let me explain WHY I a...
Created a UITextField for "Postal Code/ZIP" field with a keyboardType of UIKeyboardTypeDefault. I would like to use the default keyboard but want the numbers & symbols to be shown by default as apposed to letters.
Apple does this when you are entering addresses in the Contacts.app.
Anyone know how to get this accomplished?
...
I created a custom implementation of a multi-selectable table view. Multiple rows can be selected programatically. The only part I haven't been able to figure out is how to programatically set the background view of cell to the default system cell selected color/pattern.
Does anyone know how to do this?
Thanks!
...
I'm making a "simple" to-do-list project and running into a few bumps in the road. The problem is that my NSTableView is NOT showing the data from the NSMutableArray "myArray" and I don't know why that is. Can someone point out my mistake?
/*
IBOutlet NSTextField *textField;
IBOutlet NSTabView *tableView;
IBOutlet NSButton *button;
...
Hello all,
Doing some iPhone dev, have the app working quite well. However, I have a UIScrollView with autoresizing content and contentSize which works quite well, except when I rotate to the landscape view it always has an extra 100 or so pixels on the scroll height. I don' want users to be able to scroll so far past the content.
Has ...
Hi,
I have a scrollView (width:320px height:100px) on my UIView, inside it I add 10 images with width:106.5px each. After that I use this function to have 3 different parts inside my scrollView, so everytime I scroll, an image will automatically be center.
-(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL...
So I have all this code that I have debugged and it seems to be fine. I made a mutable string and for some reason I can not get it to be displayed on my label. the debugger says
"2010-04-22 22:50:26.126 Fibonacci[24836:10b] * -[NSTextField setString:]: unrecognized selector sent to instance 0x130150"
What is wrong with this? When I ju...
Okay so im finally to the point where I am testing my iPad App on an actual iPad...
One thing that my app does is display a large (2mb) image in a scroll view. This is causing the iPad to get memory warnings. I run the app in the instruments to check for the leak.
When I load the image, a leak is detected and i see the following in th...
Greeting,
I'm a C# programmer guy. I'm planning to start developing app for iphone but I'm not sure if I should use C# under MonoTouch or just use the native language for iphone OS Objective C.
Is there a different to program for iphone app using C# or Objective C?
Is there limitation using C# to program app for iphone or it can do a...
NSURL * url = @"http://192.168.100.161/UploadWhiteB/wh.txt";
NSData * data = [NSData dataWithContentsOfURL:url];
if (data != nil) {
NSLog(@"\nis not nil");
NSString *readdata = [[NSString alloc] initWithContentsOfURL:(NSData *)data ];
I write this code to download a file from given url... but i get an error on line
NSData * data =...
I have been trying to check whether an NSInteger is odd or even. I have found a way to do it using C but it doesn't work with Objective-C. How would I do this?
...
Hello,
1) How to read the data from read stream in Objective-C,
Below code would give me how many bytes are read from stream, but how to know what data is read from stream?
CFIndex cf = CFReadStreameRead(Stream, buffer, length);
2) How to extract only the 1st 2bytes of data in the read stream in Objective-C
For Ex: If this is the d...
What is the normal behavior in Objective-C if you call a method on an object (pointer) that is nil (maybe because someone forgot to initialize it)? Shouldn't it generate some kind of an error (segmentation fault, null pointer exception...)?
If this is normal behavior, is there a way of changing this behavior (by configuring the compiler...
I have an application that needs a database. The application is running fine in the simulator. But when i try to deploy it onto the iphone then it gives me the error that 'no such table animal'. Where is the problem? I am providing the code for better understanding
(void)viewDidLoad
{
NSArray *paths = NSSearchPathForDirectoriesInDomains...
Using the Gregorian calendar, I am able to get the number of the day of the week (i.e. 1 for Sunday and 2 for Monday, etc.) but I am not able to find a function that displays the name of week then the number. Can anyone help?
Here is my code to get the number of day:
NSDate *dates = [gregorian dateFromComponents:component];
NSDateComp...
Hi,
I have a table in which I want a dynamic image to load in at the left-hand side. The table needs to use an IF statement to select the appropriate image from the "Resources" folder, and needs to be based upon [dog types].
The [dog types] is extracted from an RSS feed, and so the image in the table cell needs to match the each cell's...
I have to create a web service for iPhone. So I would like to know which web response is the best for iPhone app developement(SOAP vs REST vs XML vs JSON vs ... any other).
Is there any good example to access webservice for the best web response?
...