Hi, I am new to IPhone developing.
I have got very strange issue with NSURL which is driving me crazy. I want to instantiate NSURL object to use it in loading image. But instantiation never happens in proper way. It always says my url in invalid.
Basically I use code like below:
NSString *str = @"http://google.com";
NSURL *url = [NSUR...
Trying to move the position of the back item on the UINavigationBar by getting a handle to the backbutton however I only seem to be able to make it disappear rather than do anything with it
I have the following in viewDidLoad
self.navigationItem.leftBarButtonItem.title =@"Testing";
self.navigationItem.backBarButtonItem.title= @"1234";...
I have a view (UIScrollView), which loads some data, and displays various things from it in various subviews. So I have approx 10 subviews (UIImageView, UILabel) and I need to place them programatically considering their unpredictable contents (i.e. different height/width for the UILabels depending on the text property).
From what I've ...
In iPhone UI terms, what's the name of the effect that causes additional options to appear when you tap-and-hold an element?
For example, when you hold down the "e" keyboard key for a moment, causing the additional accent mark buttons to appear.
Is there an established approach to implementing this effect, or should I code it up from s...
Could anyone help me solve this problem please?
I have a option called favorite, each time I choose my favorite song, the song will be added into inside that favorite option. So I made a table for it, and each cell will store each song the i choose. I can remove the song as well. But before I choose any song, inside that table I want it...
Hello,
iSTat shows a list of running tasks and also shows the Mac address of the Wifi connection. I understand that there's a way to get the Mac address via NSHost but it seems to be a private API. Also the task list is a mystery to me. Where do they get all that information from?
Thanks!
...
I have a WebView, and I want to call a view in Objective-C from JavaScript. Does someone know how I can do this?
...
I know how to do it for a float:
#define kMyConstant 1.0f
but how could I do that fora BOOL value?
...
i.e. I want to bring this in my code:
static BOOL MyConstantBool = YES;
Must it be before or after @implementation? Are there rules where to place that? Can it also go into the header file?
...
I have a class which is intended to be abstract. This means: When someone subclasses it, a few methods MUST be overwritten.
But on the other hand, those methods are not intended to be called manually from anywhere except inside the abstract class (the superclass of the subclass).
Must I declare these methods in .h anyways or can I just...
I have an UIImage which I want to draw on a UIView. But instead of creating an UIImageView and adding this as an subview, I want to overwrite -drawRect: and draw my UIView directly.
For example, my code looks like:
- (void)drawRect:(CGRect)rect {
CGContextRef myContext = UIGraphicsGetCurrentContext();
UIImage *img = [UIImage i...
Whats the best way for UIViewControllers that are pushed onto a UINavigationController to communicate with each other?
Method chaining back up to the root most parent view controller?
Connecting references to other view controllers w/ IB?
...
Fundamentally, what I want to do is within, for example, ViewControllerA display ViewControllerB and ViewControllerC. How would I do that?
Thanks in advance.
...
I have a UITextField but when it overflows I want it to scroll not use an ellipses. Can you do this on the iPhone?
...
I am assigning the contents of the clipboard to the UITextView text property. However, when I check the hasText property, the condition is always false.
NSString paste_text = [[NSString alloc] init];
self.paste_text = [UIPasteboard generalPasteboard].string;
....
my_UITextView.text = self.paste_text;
//THIS CONDITION IS ALWAYS FAL...
Hi all
Background:
I have a UITableView showing an image in each cell. These images are all part of a big pdf-file. So what I am doing is actually rendering little pdf-parts in those UITableViewCells, each cell displaying just one piece. Therefore I add a UIView to the contentview of the cell and render the view on demand.
Rendering the...
I'm building an iphone app and I've got a table view with some textfields inside the cells, the content of the fields is set in viewWillAppear (its a grouped TableView w/ 3 fields that are always the same). The content of the text fields is retrieved from getter methods that return values from various class variables.
The problem I'm h...
Hello,
I have a NSMutableArray:
NSMutableArray *temp = //get list from somewhere.
Now there is one method objectAtIndex which returns the object at specified index.
What I want to do is that, I want to first check whether an object at specified index exists or not. If it exists than I want to fetch that object. Something like:
if (...
For example, I have an NSDecimal myDecimal. Lets say it represents something like "-1234567.89"
How can I get a clean string representation of that decimal without any beautification / formatting? No localization? Floating point symbol = . and rest only numbers from 0 to 9, and eventually an - if it is negative? I need that string in st...
I was wondering when you remove an object using removeObject in an array if that removed object is handled properly. Would the object being removed be released?
...