Hello, I would like to know how to do the next:
I have one app that make some connections to receive datas (this datas are show in the screen)
I would like to know wich code i can use to wait each connection, I mean, the time between the connection start and this finish i would like to show in the screen one spin (Loading...).
I have ...
If I alloc and init an object in a method that is called quite frequently, and if I don't release it immediately, does the object become a memory nightmare? Or will the alloc and init be ignored if the object is already in memory?
This is somewhat difficult for me to explain, sorry!
Thanks.
...
Right now I'm using this code to get the size of a folder:
NSArray *contents;
NSEnumerator *enumerator;
NSString *path;
contents = [[NSFileManager defaultManager] subpathsAtPath:folderPath];
enumerator = [contents objectEnumerator];
while (path = [enumerator nextObject]) {
NSDictionary *fattrib = [[NSFileM...
What's the easiest way to save UIColor into NSUserDefaults ?
And how to re-create it from NSUserDefaults?
Many thanks for reading
...
Does anyone have any sample code to create a JSON payload to be sent as a HTTP POST Request in Objective-C? An example of the json payload I am looking to generate looks like:
{__metadata:{\"Uri\":\"/NewLoc/\",
\"Type\":\"Location.NewLoc\"}, \"LocID\":\"100006\",
\"latitude\": \"40.123456\", \"longitude\": \"-65.876543\",
\"VisitDate\":...
So I'm working with WebKit's - WebView and WebFrame. I use a custom NSURLProtocol to retrieve the HTML for each request from a database. The problem arises from the fact that the links in the HTML are all relative, when they really ought to be absolute. For example, the page
foo/bar.html
May have a link in it that points to
foo/baz.ht...
My GUI for an iPhone app uses numerous UIViews. The user "flips" through these views when they tap a button to go forward or backward. The views are stored offscreen and are added to an actual view only when the program needs to display it.
During the flip process, the program tells the parent view (a uiscrollview) to remove any existin...
I am declaring an array of NSString* in a header file of a class.
PolygonShape.h
NSString* POLYGON_NAMES[] = {@"Invalid Polygon", @"Monogon", ...};
Now I am using this in PolyginShape.m as follows:
- (NSString*) name {
return (POLYGON_NAMES [self.numberOfSides]);
}
numberOfSides is an iVar which will indicate the index at which the...
I'm using the wonderful RegexKitLite framework built upon the ICU library that ships with Mac OS X and iPhone OS. It has been smooth sailing so far, with the exception of this error that appears intermittently when searching for matches:
Internal Error
Invalid parameter not satisfying:
(cacheSlot->setToHash == buffer->hash) && (cacheSlo...
i have a scrollview with uiview added as subview..now how do i open a new view when i touch on the view????
i want a new view to appear...before this i have buttons on my view...so button have the method "addtarget perform selector"...from that i am loading a new view
here is an image of my view
...
in the case of say
- (void)applicationDidFinishLaunching:(UIApplication *)application {
...
[window addSubview:gameController.view];
...
}
how does the view of gameController retain association to gameController? I've peaked through all of the Debugger variables and I see no association other than a boolean flag that it belongs to...
Hey guys, I had a question... I'm reading Cocoa Programming for Mac OSX and in Chapter 8 part 1, where he is writing the MyDocument.m file
What does the line
employees a;
do?
employees = [[NSMutableArray alloc] init];
is above, which means that employees is a mutable array, but I'm not sure what
employees a;
does.
I'm just ta...
Is there a way to create one of the black glossy popups, similar to the one that appears to copy and paste text. I just want to give some information, so the behaviour I want is closer to the way the keyboard popup works when you type a letter but the appearance I want is the copy/paste dialogue.
Are either of these open to the public, ...
I'm looking for a crypto library to use with Objective-C code. There is a C++ library which is too big for my needs. It's 20 mb when compiled. I think a C library would be perfect to use with Objective-C.
Here is my needs for this library:
AES (Rijndael)
CFB Mode
SHA1
SHA256
HMAC-SHA1
HMAC-SHA256
PBKDF2
Your help will be greatly apprec...
I want to perform different action, not delete objects but archive them.
When user swiped on tableViewCell I need to show "Archive" instead of delete. change "Delete" button text and color to something else.
How do I customize "Delete mode" appearance?
...
Does anyone have any suggestions on how to obtain the best horizontal accuracy on the location manager? I have set the desired accuracy to NearestTenMeters, but given that the accuracy can always change depending on coverage area, how can I write some code in the locationManager to stop updating only after I get the best horizontal accur...
I have CFArray and CFString allocations going all red while checking on the Instruments Object Alloc.
Object seem to be alive but not being used, this because the used part of the histogram is 1/10th of the total histogram (which has turned red) in both cases.
the app is a photo library application with 7 view controllers. Loading up ...
I want to be able to replicate what the AddressBook does in Contacts app and Phone app when entering a phone number in both the keypad on the Phone app and adding a contact.
I know I could do it checking each time a character is entered into the UITextField but there are hundreds of number formats out there and it would take me forever...
Hi,
In the context of an Objective-C, iPhone application, I need to be able to tell whether the iPhone is connected to a wifi network, and if possible listen to changes in this state.
Does anyone know how to do this?
thanks,
gabouy
...
I load a page, saw on twitter, using a line like this:
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://twitter.com/OGOchoCinco"]]];
The page shows up fine. If the user now taps on a link that brings them somewhere else within twitter, she is brought to that page. However, if the link goes to http://...