Hey stackoverflow,
Cocoa's NSScrollView is horribly under-explained. I hope someone here knows what it's all about and can spare me a few seconds.
So I have a custom NSView. I implement -drawRect: for it to draw something, fill itself with colour, whatever. Then I have an NSScrollView wrapping it (set up through the interface Builder)....
I'm trying to have my view hierarchy loaded through calls to loadNibNamed.
For a single nib, in my ApplicationViewController : UIViewController :
- (void) loadView {
[super loadView];
[[NSBundle mainBundle] loadNibNamed:@"ApplicationViewController"
owner:self options:nil];
}
But then in Su...
After I call a SOAP webservice asynchronously using WSMethodInvocationSetCallBack and WSMethodInvocationScheduleWithRunLoop I get the result in the following callback function and begin parsing it
void wsCallback(WSMethodInvocationRef invocation, void* info, CFDictionaryRef data)
{
const void *data = CFDictionaryGetValue(resultBody, (NS...
Hey,
I'm a little confused about raising an event in Objective-C,
I came from C# (.NET) environment and I would like to learn Objective-c and Cocoa programming.
So here's my question:
I have a little application with a NSTextField that I want to use to listen to an event.
What I want to do : When I double click within this control, ...
I'm writing a program in objective-c but when I build and go the window is not loading. I can click on the .xib file and tweak the interface but when I run the program the GUI is not loading. Any ideas on why this is happening.
NOTE: I do see a menu bar that shows that my application is running but the GUI is not visible.
...
Hello!
Very simple question - how might I iterate through a NSMutableArray and do things for each item?
Much like the for loop in other langs:
foreach(array){
dosomething();
}
Thanks!
Christian Stewart
...
Hi All,
Caveat: I have looked for the answer to my question and several come close, but I'm still missing something. Here is the scenario:
I want a way to create UITableViewCells that contain UISwitches dynamically at run time, based on the data in a table (which I can do). The problem becomes connecting the switches such that I can...
I was told that the application:openFile: delegate method for NSApp would allow my application to open files by dropping them into the dock, but does this also apply to NSStatusItems in the menu bar? I would like to know before trying to implement.
...
How do i load a new xib on an orientation change on the ipad?
...
I have a project that has a library subproject that gets imported. I have access to the source code of both the main project and the subproject.
The subproject uses Core Text. Because the subproject must be used on pre and post 3.2 applications, Core Text is weak linked and all of the Core Text related code is wrapped in the logic:
#...
How i can make an xml file from NSString object?
In other words, how can I parse XML from an NSString object?
...
A user selects a song in my mp3 player. He proceeds to rename a song (thus highlighting the "name" column of that given song).
Let's say he pastes in "The\nGreat\nSong". By default, if the string formatter doesn't allow newlines (which is what I want), the app will produce a beep.
How can I process the string before it is pasted? This ...
I'm trying to learn Objective-C, specifically with regard to iPhone programming. I've done programming at A level, which was 6 years ago now, and I dabble with some stuff every now and then. I was wondering what books people recommend to teach myself - I don't have a very good grasp of OOP, things like KVC/KVO (is this just ObjC?), and r...
I need to be able to create an interface like you create in C# to enforce a group of classes to implement certain methods.
Is this possible in objective c?
...
what does & sign mean when used in objective c
for example?
int i = 1;
NSData *data = [NSData dataWithBytes:&i length:sizeof(i)];
...
Hi,
I've been using the code below to draw on an UIView
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);
CGContextSetRGBFillColor(context, 0.0, 0.0, 1.0, 1.0);
CGContextSetAlpha(context, 0.5);
CGContextSetLineWidth(context, 10.0);
CGContextMoveToPoint(context...
What is the better code to move from "page" to "page"?I have a questionnaire on 4 pages and I loading 4 views from 4 xibs.
I picked up 2 way of moving from xib to xib (in my case, from page to page).
Method 1:
-(IBAction) MaleTapped: (id) sender {
Page1M *ivc = [[Page1M alloc] init];
UINavigationController *nc = [[UINavigation...
Hi, everyone,
I have a question about the objective-C. I use the following code to add a contains from an array to another array. However, the second array is null. Can anyone help me? Thank you.
titleArray = [[csvDataArrayString objectAtIndex:0] componentsSeparatedByString:@","];
NSString *title;
dataTitleArray = [[NSMutableArray al...
I have an NSMutableArray I am trying to populate using a for-loop and making NSStrings for it. These are to be the data source for my UIPickerView. You'll see some commented out lines where I manually made NSArrays and they showed up fine, but my for-loop NSMutableArray doesn't seem to accept the strings I'm making. The NSLogs show th...
Hi, everyone,
I have a question about the objective C. I have the following NSString *name shown below:
"First Name","Second Name","Last Name";
Actually, name is the header of the CSV and receive from the URL. And I use the follow statement to break the statement to array.
NSMutableArray *csvTitleArray;
csvTitleArray = [[name compo...