Hello,
I am using the following code in my Cocoa project to call a script I made. The script is in the same folder as the project and even shows up under the "Resources" folder in XCode. The proper path is found, but it still says that the path is not accessible. Help please.
NSBundle *mainBundle=[NSBundle mainBundle];
NSString *path=[...
Hi, im searching for a convenient way of adding new arguments to multiple init-methods. its a little bit hard to discribe but my problem is the following:
I have a class witch implements various init-methods. f.e.
@interface Circle {
CGPoint center;
float radius;
}
- (id)initWithCenter:...radius:...;
- (id)initWithRect:...;...
View Controller A presents View Controller B modally, which has a button to present View Controller C modally.
Here is my flow:
A presents B which presents C
When B presents C, I want B to be dismissed, so my only view controllers are A and C. I am not sure where to call:
[self dismissModalViewControllerAnimated:NO];
in order to d...
I need to define a string that will include a string that changes (i can already make that string change) and additional text.
for example,
NSString *commentsAddress = *somestring*/#comments;
now i know it sould be something more along the lines of
NSString *commentsAddress = @"%@/#comments", *somestring*;
but I can't get this to...
I know of a couple of rules regarding Objective-C categories:
Category methods should not override existing methods (class or instance)
Two different categories implementing the same method for the same class will result in undefined behavior
I would like to know what happens when I override one of my own category methods i...
Let's say I have several lines of code to clarify specific settings on a given UILabel variable:
numberMarkings[selectedBoxX][selectedBoxY][selectedSquareX][selectedSquareY][selectedNoteX][selectedNoteY].text = @"derp";
numberMarkings[selectedBoxX][selectedBoxY][selectedSquareX][selectedSquareY][selectedNoteX][selectedNoteY].cente...
Hello,
My iPhone app was recently rejected from the App Store "because it crashes on launch". However, I cannot reproduce this crash. The app works perfectly on both the simulator and a device with the same hardware and software Apple tested it on (iPhone 3.1 running iOS 4). The crash logs they sent me say "No Backtrace Available", so I...
- (void)viewDidLoad {
[super viewDidLoad];
[self setWantsFullScreenLayout:YES];
[mainScrollView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onMainScrollTap:)]];
}
- (void)onMainScrollTap:(id)sender {
if(self.navigationController.navigationBar.hidden){
...
Hi
I created xcode universal project, I am trying to load HTML5 page in UIWebView the
problem is i cant see any control to play movie, and i am getting blank screen on the video
place, in ipad and iphone simulator,
my .html file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">...
Hi,
What would be the best method to compare an NSString to a bunch of other strings case insensitive? If it is one of the strings then the method should return YES, otherwise NO.
...
I am using MFMailComposeViewController in my app, it shows a black title bar, how can i show its title bar with blue background theme?
...
How to detect iphone shake in a ViewController?
...
here is code
UITouch *touch = [touches anyObject];
if([touch tapCount] == 2)
{
NSLog(@"f");
}
Its working sometime and not most of the times.
...
What it says on the tin. All I want to do is save an NSString to a .txt file in my Documents directory so it can be accessed by the user. This is called in applicationWillTerminate:
NSError* err;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths object...
I have a cross platform library that has strange problem only on iPhone and only under release.
// .h
class cColor
{
public:
static const cColor Red;
static const cColor Green;
static const cColor Blue;
u8 r;
u8 g;
u8 b;
u8 a;
inline cColor(...) : ... { }
};
// .cpp
const cColor cColor::Red(0xFF, 0x00, 0x00);...
Hi,
I'm having some difficulty understanding exactly how the responder chain works in an iPhone application.
My situation is as follows. I have two UIViewControllers that are installed on a tab bar controller. Call them view controller A and B. They are unrelated in the sense that neither of them has a reference or knows about the othe...
Hi,
I have two classes, Class A and Class B, both of them are subclasses of UIViewController.
I class A I have an NSString and I want to use this NSString in class B.
ClassA.h:
@class ClassB;
@interface ClassA : UIViewController {
ClassB *classB;
NSString stringA;
}
@property (nonatomic, retain) ClassB *classB;
@property (nonat...
I'm using ABTableViewCell by atebits: http://github.com/enormego/ABTableViewCell http://blog.atebits.com/2008/12/fast-scrolling-in-tweetie-with-uitableview/
The one thing I can't figure out is how to change the height of the cell. Due to the drawing method, I don't think it responds to the normal methods that I've found for changing the...
How can i add/show “Play” button in the toolbar. In code “TTPhotoViewController.m”, i can see there is a method “playAction”, but i couldn’t find the way to activate that. could you please help me.
Thanks in advance.
...
To open url of itunes we need current version of itunes in iphone , because i send url its giving your request could not be completed , if it is new version it is open it is old version its giving error "your request could not be completed , please help me , that url should be work in all versions
...