Is there any easy way to get the string index in an NSString if I have the line number and column number?
For example:
myString =
abc
def
ghi
[myString getIndexFromLineNumber:2 columnNumber:1] should return the index of h in myString, so in this example it should be 10 (assuming new lines are 1 char long).
...
Hello all this is my first post here
i have been working in an iphone application it sound like a small music instrument
i've used this code to load my music notes :
// get the path of the sound file
NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"do"
ofType:@"mp3"];
...
m_NetworkController is my network class and SelDataRecivedError is member of type SEL
now if i am trying to initialize this selector member from other class like this:
m_NetworkController.SelDataRecivedError = NSSelectorFromString(@"DataRecivedErrorFromServer");
i am getting the error
-[NCcontroller setSelDataRecivedError:]: unreco...
Say I have a string:
NSString *state = @"California, CA";
Can someone please tell me how to extract the last two characters from this string (@"CA" in this example)
...
I find myself casting return types alot to silence compiler warnings and it always makes me feel like i'm doing something wrong.
This example is Objective-c
const char *strBuf = [anNString UTF8String];
[anOutputStream write:strBufr maxLength:len];
This goves me a compiler warning as
-UTF8String returns const char * and -write:maxLe...
Hey friend ,
I have problem with AVAudioPlayer in iphone when ever the my ipod is lock(sleep) the song is stop.What I have do in coding for making music is continueslu start even the ipod is lock(sleep) .
please help me
I am totally new in this .
...
Hey all i've tried to add an other view it work properly but it look like a tableview I want it just like the first one how can i change the view to be like what I want not tableview
btw this is my flip button code :
- (IBAction)flip:sender{
// create a new SecondViewController
SecondViewController *playback =
[[SecondView...
Hi All,
I will explain my question from an example.
In .H file//
@interface Employee:NSObject{
@private
NSString *name;
}
@property(nonatomic,retain) NSString *name;
in .M file//
@implementation{
@synthesize name;
}
In this scenario when i access the name property within another class , like myEmp.Name = @"John";
it doesn't...
Hi guys,
I need to get the Contact image for a particular person from my address book in Iphone can any one suggest how to access this.
Hope i will get quick response from ur side.
Thanks in advance,
Monish.
...
hey all i want a code the replace whitespaces by a + sign in objective-c
...
Hi to all,
i have created a music application in which there are 90 songs.when i click on a particular song it plays. i need that when i click on a particular song it should switch to next song automatically when the current songs completes.Please help me in solving this problem
...
So I have an textView and need to have the same control over it as a regular textField.
I am quite new to iPhone-programming so please be nice to me. :)
What I need is functions like:
textFieldDidBeginEditing
textFieldDidEndEditingWithoutText
How can this be done?
...
I am planning to write an open-source library which really needs to be written in an object-orientated language. One problem is that the library should be possible to use with C, where it doesn't matter of direct inclusion of source code or (dynamic) linking to a precompiled library.
I know all three C++, C and Objective-C.
Objective...
I need to know how I can access my calendar and contacts from my iPhone from my own App? Is it possible?
I need it because I created a stats App and need to know how many contacts and calenders posts the phone has.
...
I have noticed that a problem in my app is caused because the Datasource methods of the UITableView are called before viewDidLoad.
The problem is that the UITableView doesn't have the correct amount of rows, it gets the amount of rows from the NSFetchedResultsController but the performFetch "function" for that is called in the viewDidLo...
I am using mogenerator.I am getting CoreData error as follows:
Failed to call designated initializer
on NSManagedObject class 'ClassName'.
Anybody please help me to solve this error.
...
Hi
I'm getting a warning when I set the delegate for UIImagePickerController. It's because UIImagePickerController and its parent UINavigationController both have delegates that can be used. The code works fine but just wondering how to handle delegates and inheritance properly and lose the warning.
So basically I've created my own MyI...
operator class:
#import <Foundation/Foundation.h>
@interface operator : NSObject {
int number;
}
@property int number;
@end
@implementation operator
- (id)init{
self = [super init];
if (self) {
[self setNumber:0];
}
return self;
}
@synthesize number;
@end
main.m:
#import <UIKit/UIKit.h>
#import "operator....
I just wondered if comments are included in binaries, or does the compiler know to remove them?
...
Hi all,
I need a help from you, That is I am implementing an application in that I need to call a method once the app resign and becomeActive but it is not working. Is there any way to call a method from our viewController when the device become active.
Thanks in advance.
Sekhar Bethalam.
...