Hi, I am just having a quick look at UIWebView and have written a small browser with a back button, a UITextField and a forward button. Here is what happens:
I enter "www.google.com" into the textField and it goes to the page.
The textField says "www.google.com"
I enter "www.apple.com" and it goes to the page.
The textField says "www.a...
I have been reading up on OS X's Core animation. I would like to know if it is possible to control the OS windows in a similar way to Expose, Time Machine, and or switching user screens. I am aware that it is possible to easily do these effects in your own program. But if one wanted to control Safari's browser windows, let's say, is that...
If a retain (reference) count of an object is greater than 1 in a dealloc method right before releasing does this mean there will be a memory leak?
I was debugging my code to find another issue but then ran into this subtle one. One of my object's retain counts was 3 in the dealloc method. This object is a property with retain and is ...
I have a ViewController,
i declare
NSString *xTitle at the top in testViewController.m file
when i set the xTitle=@"anytext" in viewload event;
and i tap a button, it shows the UIActionsheet.
i try to read xTitle in UIActionSheet's clickedButtonAtIndex.
i see the xTitle's value "anytext", its ok.
but when i set the xTitle from NSDic...
Hello,
I have a application, and had to create another .h and .m file. This is so my downloads will be down in the background
.h File
#import <UIKit/UIKit.h>
@interface AsynchronousImageView : UIImageView
{
NSURLConnection *connection;
NSMutableData *data;
}
- (void)loadImageFromURLString:(NSString *)theUrlString;
@end
A...
- (id)methodThatReturnsSomething
{
@synchronized(self) {
return nil;
}
}
When I do this on Xcode, it returns me a warning: "Control reaches end of non-void function"
Is there any problem with that code?
...
I have to POST data to a php page from an Iphone application, so i need to encode the parameters properly, converting the special characters...
Specifically i need to send the UDID of the iphone.
I've found many helps on the web to encode the String to pass as parameter, but i got a strange error.
I'm using this function:
- (NSString...
Can anyone just clarify this for me, I was under the impression that to use webViewDidFinishLoad: I would have to conform my class to <UIWebViewDelegate>. However I forgot to do this but found it still works where I was expecting an error/warning. Can anyone explain for me?
-(void)webViewDidFinishLoad:(UIWebView *)webView {
// do st...
I am very much new to the iPhone SDK. I just haven't been able to find the right search query to find out how to do this kind of checking for the existence of a new or deprecated feature.
Case in point:
iOS4 deprecates UIKeyboardBoundsUserInfoKey used for checking the height of the keyboard (and moving, scrolling or whatever to adjust ...
This is a design questions, so multiple ideas will be fine.
In my iPhone app, I keep track of Multiple players' life, which can increase and decrease over time. After the game is done, I want to be able to show them their life throughout the game, so they can see how they did. Now, this will also be stored in Core Data, so they can lo...
I am loading json into a list of objects I am adding to a NSMutableArray which seems to be working fine except for the fact that I can't seem to keep the array around to access later.
This is my .h:
@interface ClientController : UITableViewController {
NSMutableData *responseData;
NSMutableArray *ClientList;
}
@property (nonat...
Within my MainWindow.xib I have a setup like I have here below. I have a Tab Bar Controller with a Navigation Controller within the Tab Bar Controller. I can switch between the different Navigation Controllers and this all works.
What I am trying to do now is add a Right Bar Button Item to the Navigation Controller. I can't seem to us...
Hey guys! I am learning tons on this thing. Reading also, but this is awesome!
Ok.. so long story sort I hope. I'm making a data class to pump out some instances of people that have various attributes. I would like my view controllers to be able to access them (through properties of course.. I think) to manipulate their data.
Where in...
Is there a way to simulate a break statement in a dispatch_apply() block?
E.g., every Cocoa API I've seen dealing with enumerating blocks has a "stop" parameter:
[array enumerateObjectsUsingBlock:^(id obj, NSUInteger i, BOOL *stop) {
if ([obj isNotVeryNice]) {
*stop = YES; // No more enumerating!
} else {
NSLog(...
Hi, i have the code:
UIButton *button = [[UIButton buttonWithType:UIButtonTypeCustom] initWithFrame:CGRectMake(25, 0, 35, 35)];
[button setTitleColor:[UIColor clearColor] forState:UIControlStateNormal];
[button setBackgroundColor:[UIColor clearColor]];
[view addSubview:button];
Now i add a action
[button addTarget:elem1 action:@select...
I want to use pathForResource, but it doesn't look like it will create the path if one doesn't exist. Therefore I'm trying to create one manually by doing the following:
NSString *path = [NSString stringWithFormat:@"%@/%@.plist",[[NSBundle mainBundle] bundlePath],@"myFileName"];
I'm creating files dynamically, so I need to access th...
I'm trying to implement local notifications for a calendar-esque application, and I've hit a barrier with reminder intervals. Local notifications seem to only take NSCalendarUnit constants as repeat intervals ( see http://developer.apple.com/iphone/library/documentation/iPhone/Reference/UILocalNotification_Class/Reference/Reference.html#...
Hi,
I'm new to Interface Builder and Objective-C.
I'd like to layout an iPhone interace in IB similar to the "edit event" or "edit contact" in the native iPhone apps where Grouped Tables are used.
It seems like i have to add several very generic-looking Grouped Tables in IB, and then write a bunch of -cellForRowAtIndexPath: and numberOf...
Hi,
I have an app that works fine in OS 3.*...
However, in OS 4, this line of code doesn't seem to work.
[window addSubview:[mainViewController view]];
Is there a different way to add a view to window in OS 4?
Or is it even the wrong way to add a view even on OS 3.*?
Thanks,
Tee
...
Hi,
I'm struggling to understand the correct model.
I have a uitableview full of rows of data.
The data is the result of a REST call, which depends on the result of a previous REST call.
So in my appDelegate didFinishLaunchingWithOptions: method I'm making an NSURLConnection for the first REST call and then getting the results back in ...