Hi,
I have created a view that I want to be able to rotate. The two views are: containerView and this has a .backgroundColor of red and BackgroundImage as a subview. Here is my code for rotating:
- (void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
[self adjustVi...
I have implemented the MKAnnotation as below. I will put a lot of pins and the information for each of those pins are stored in an array. Each member of this array is an object whose properties will give the values for the title and subtitle of the pin. Each object corresponds to a pin. But how can I display these values for the pin when...
Hi,
I want to implement PTAM(Parallel Tracking and Mapping) system in iPhone.
like this: http://www.youtube.com/watch?v=pBI5HwitBX4
Does anyone know open-source project of PTAM or a sample code?
...
I'm working on a universal app that uses a SplitViewController to present a master-detail view. In the iPad HIG on Split Views, Apple states:
In general, indicate the current selection in the left pane in a persistent way. This behavior helps people understand the relationship between the item in the left pane and the contents of the...
Hi there ;)
I have an app with tableViews, and on some of them, the cells dislays an accessoryDetailDisclosureButton that pushes a DetailViewController.
On this DetailViewController, the user can change some data. I show a "Save" Button to explicitly save the data.
BUT (yes, there's always a but), let's say that the user changes some da...
In IB I can set the identifier of a UIBarButtonItem to 'play' which adds an image of a play button (right-pointing triangle).
Is there a way to change this image programatically? I want to change it to 'pause' when the play button is pressed.
I know you can initialize a UIBarButtonItem with an identifier but I've yet to find a way to ...
Hi;
I'm using -setNeedsDisplayinRect to update only a part of my UIView. However, all of my drawing done previously to calling this method is erased.
Here is my code in the UIView subclass:
-(void)drawRect:(CGRect)rect{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(context, r, g, b, 1);
...
I've created a model in Xcode, and for various attributes I have minimum & maximum values defined and that are enforced by coreData at runtime.
I'm using NSManagedObject validateValue:forKey:error to check for user input values.
I was a bit disappointed to see that the localized error message is not specific, and I get a "The operation...
Hi all, I have an app that is nearly finished but encountered an annoying problem. In the app, I want to play a sound when I tap on some object, then the object disappears. This is the piece of code I used:
In Object.h
#import <UIKit/UIKit.h>
#import <AudioToolbox/AudioServices.h>
@interface Object: UIView {
UIImageView *image;
...
i have to set the font size and font family of a dynamically created textView,sothat it gives same appearance as the one generated using Interface builder.Please help me....
...
My app reads a from decentralized (so I have the ability to change servers if I have to) xml file with TBXML parser. The xml file consists of only a few lines like this
<xml>
<mirror url="http://www.someserverabc.com/data.xml" priority="1"/>
<mirror url="http://www.someservermirror.com/data.xml" priority="2"/>
<mirror url="http://www.a...
I am trying to write the following without using dot notation ...
[scrollView setMinimumZoomScale: scrollView.bounds.size.width / image.size.width];
Is this right?
[scrollView setMinimumZoomScale: [scrollView bounds].size.width / [image size].width];
cheers Gary.
...
Hello all -
I am learning Obj-C but still occasionally have a difficult time wrapping my head around some of the mem management stuff. I am using custom cells with a UITableView, and implemented the cellForRowAtIndexPath method where I accidentally released the cell at the end. This obviously caused problems as the cell was also gettin...
At the moment I have 2 completed iPhone applications. Both these applications must be contained in to one application. I can't have multiple apps on the app store and to avoid confusion among people using these apps I must have them contained to a single application that gives the user the capability to launch any application in the wrap...
Using Instruments on the device it detects a 3.50 KB memory leak using Apple's Reachability 2.0 code in my app. The Leaked Object is GeneralBlock-3584. The leaks tool points to the following code:
- (BOOL) startNotifer
{
BOOL retVal = NO;
SCNetworkReachabilityContext context = {0, self, NULL, NULL, NULL};
if(SCNetworkReac...
I have a UILabel for each cell at cellForRowAtIndexPath.
UILabel *cellLabel = [[UILabel alloc] initWithFrame:frame];
cellLabel.text = myString;
I want to access that string "myString" at didSelectRowAtIndexPath using indexpath.
NSString *anotherString = cell.textLabel.text;
returns null.
Now if at cellForRowAtIndexPath, I did some...
I'm using addTimeInterval for creating local notification but it seems that it is now deprecated (iOS 4).
My code:
localNotif.fireDate = [now addTimeInterval:timeInterval];
Xcode's warning:
'addTimeInterval:' is deprecated (declared at /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/Fo...
In the following code I have a view object that is an instance of UIScrollView, if I run the code below I get warnings saying that "UIView might not respond to -setContentSize etc."
UIImage *image = [UIImage imageNamed:@"Snowy_UK.jpg"];
imageView = [[UIImageView alloc] initWithImage:image];
[[self view] addSubview:imageView];
[[self vie...
Hello,
I need to develop an iPhone/iPod Touch application that creates a server to send some data stream (characters or bytes) to a Windows C++ application via Bluetooth. I'm thinking of creating a TCP connection, but don't know where to start.
What iPhone API should I use do to something like this? Does anyone knows some code examples...
I've been using http://code.google.com/p/plblocks/ for a while now to get blocks support in our 3.2 iPad app. It was recently pointed out to me that you can set xcode to use the 4.0 SDK, then set the OS Deployment target to 3.2.
If I do, the following code works.
void (^world)() = ^ {
NSLog(@"Hello World");
};
NSLog(@"Hello?");
...