I am trying to create a two view, single controller application as follows: I have two XIB's. Each with the same File's Owner.
As a test, I have placed a UILabel on each XIB. I have connected the File Owner to the UILabel in each XIB. The outlet property is the same.
When I instantiate the nib using loadNibNamed I also set the 'owner' ...
I have a view with a scrollview. I use code to add labels to the scrollview. Since there's a lot of redundant code, I tried to move the label creation to a separate function that returns a UILabel. Here' that function:
- (UILabel *) f_MakeLabelWithL:(float)MyLeft T:(float)MyTop W:(float)MyWidth H:(float)MyHeight Align:(UITextAlignment...
Does iOS (or iPhone OS) support file operations via SMB network shares?
If so, are there any documents about how to do this?
...
So I have a tableview as a root screen and an add button that presents a new screen that has a datepicker. When I present the new view, I set the root screen to delegate.
Now, I need to pass the data from the uidatepicker screen back to its delegate, but I can't remember how that was supposed to work...
I know that I should be able to...
Does Twitter has the iPhone SDK which has a login popup like facebook iOS SDK?
...
Hello folks,
I am porting PC game to iPad which has ton of graphic assets (over 250MB) and I am about half-way through. I didn't have iPad until now so I tested it only on simulator and everything was fine. But when I run it on device for first time, it crashed.
All I got from console is
Program received signal: “0”.
Data Formatters...
Using the code below, I put text from a plist into a textView. The textView is not yet firstresponder; the text is initially for reading only. In iOS4 the goToEndOfNote code positions the cursor at the end of the text AND scrolls to that position. In 3.1.3 it doesn't scroll to the end until the screen is touched (which isn't required ...
Hi, I'm trying to add a little red line on the bottom of my UIView.
I want the line to be a 1px line.
Can someone tell me why the following code:
- (void)drawRect:(CGRect)rect {
CGContextRef currentContext = UIGraphicsGetCurrentContext();
CGContextSaveGState(currentContext);
CGContextSetRGBFillColor(currentContext, 0.0f, 0.0f, 0.0f, 1...
Hi there.
I am building a scrollview which swipes through 100 images of houses.
It works. But.... For every image viewed the allocated memory inscreases by 2.5 MB. In the end the app crashed because it ran out of memory.
Even if I use the same image as specified in the code below, I run out of memory because of the memory allocations.
...
Why would you drain an autorelease pool instead of releasing it?
...
What does it mean to have a weak reference to a framework in iphone sdk?
...
Hello together,
I want to get the height of a CGRect-rectangle. I have a simple problem in understanding why these lines return 0 height:
CGRect lalaframe = CGRectMake(10, 30, 45, 50);
NSLog(@"_height of test frame = %d",lalaframe.size.height);
Should be an easy fix...
Thanks!
...
I'm needing to purchase whatever devices are needed to do testing for iOS applications. My initial thoughts are to test on a first-generation iPod Touch and an iPhone 4. Testing on the old iPod Touch with 3.1 software will give a good indication on how the app will work with little memory, and the iPhone 4 will obviously be a test for th...
Hi,
I creating a rss reader for a site from Denmark, they have some thing like this in their CDATA:
<description><![CDATA[><p><img src="http://www.fotoagent.dk//single_picture/10851/1/small/18.Sep.2008_033_fodring_v_h_fde_40.jpg" alt="" width="150" /></p><p>For at sikre Blåvand by mod oversvømmelse, er Kystdirektoratets st...
-(void)viewWillAppear:(BOOL)animated {
//setup toolbar
[self.navigationController setToolbarHidden:NO];
self.navigationController.toolbar.barStyle = UIBarStyleBlackTranslucent;
self.navigationController.toolbar.alpha = .8;
self.navigationController.toolbar.tintColor = [UIColor colorWithRed:6.0/255.0 green:95.0/255.0 blue:163.0/255....
I'm implementing the lazy table images algorithm similar to how facebook does. I got this from an example given by apple: http://developer.apple.com/iphone/library/samplecode/LazyTableImages/Introduction/Intro.html
It works fine up until I start getting memory warnings. My images are stored in a dictionary, that links up a key to an ima...
Hi everyone,
I'm trying to swap two strings but I'm not sure if what I am doing is legal (coming from java I'm new to the whole retain count memory management).
Here's my code:
NSString *temp = [[NSString alloc] init];
temp = originalLanguageCode;
originalLanguageCode = translatedLanguageCode;
translatedLanguageCode = temp;
[temp rele...
I found this post for aligning a text label top that was very helpful.
- (void)sizeToFitFixedWidth:(NSInteger)fixedWidth
{
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, fixedWidth, 0);
self.lineBreakMode = UILineBreakModeWordWrap;
self.numberOfLines = 0;
[self sizeToFit];
}
Is there a way to extend ...
I am trying to run Instruments on my iPod touch. I have the iPod Touch connected to the device. I fire up the Instruments and select the target as "iPod Touch" then I choose the target to be "myappname". This fires up the app but the app is stuck on the cocos2d default home screen (the cocos2d logo). When I run the application on the dev...
Hi friends,
I have used NSMutable Dictionary and NSMutable Array. The datas are to be stored and retrieved from plist(Documents Directory) using NSArray of NSMutable Dictionary.
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFArray removeObjectAtIndex:]: mutating method sent to immuta...