Trying to create an app that does some socket communication (Writing only).
I can get it to work with a static value:
UInt8 buf[] = "play";
int bytesWritten = CFWriteStreamWrite(writeStream, buf, strlen((char*)buf));
I'm a relative neophyte to C/Objective-C and I'm trying to figure out how to pass an NSString to a function and get the...
I'm trying to take an input string and return a new string that is encoded/decoded based on a dictionary that I created. I have tried the below code using instance variables and local variables. I am having a problem using the for loop. I get out of scope errors. When I use an instance variable for newText, I get a exec bad address w...
- (void)viewDidLoad {
[super viewDidLoad];
//..do stuff..
}
or
- (void)viewDidLoad {
//do stuff
[super viewDidLoad];
...
Hi, I have a nib file with a custom uitableviewcell inside. I dont'subclass uitableviewcell. In my tableViewController, I load my custom uitableviewcell and put it in my tableView. But when the tableview is showed, the height of my cell is the standard uitableviewcell height, why? Because in my nib file the height is 311.
Alex
...
Ok, so here's the thing. I have a UIViewController that contains a UITabBarController. That tab bar has a UIViewController for each tab button. Now, inside one of the tab buttons is an MPMoviePlayerController that is playing a stream from over the network. Playing the stream works just fine and you can see the video and hear the audio.
...
I know that if I get an object, for example an NSArray, with a method like [NSArray array], it will be autoreleased. So I don't have to do a release myself. My question is, do I have to retain it after I get it this way? I wouldn't have thought so, since the count starts at 1 and it won't be released until the pool is released, but I've ...
I've come over from experimenting with android to Iphone development. so i'm having a lot of trouble not only finding what i'm looking for but knowing even the right term to use for this subject. Alright, this is what i'm looking for, i just need to know if it's possible, and if it is, a push in the right direction.
The best way i can d...
When my iPad is connected to my bluetooth scanner it won't show the keyboard in my app.
Anyone know of a work around for something like this?
...
Hi,
I tried mirroring the screen of a simple new TabBarApplication with iphoneos-screen-mirroring for iPad:
http://code.google.com/p/iphoneos-screen-mirroring/
Everytime (also without including the code) if I try to activate the TV-out in Simulator mode the app crashes without errors.
If the external TV-out is activated it staies bla...
Hi I have an array of strings separated with a delimeter ":". I tried separating strings using componentsSeparatedByString method and then save the result into an array and later use that array to produce the desired output, but it didn't worked.
For example
Now my UITableView displays cells as:
Case 1:
How:Many
Too:Many
Apple:Milk...
I need to create a tab bar app with acess the camera in the third section of tab bar, but a try with [self.view insertSubview:overlay.view atIndex:1]; and doesn't work. They don't load the camera. How i do that?
...
in xxx.h
UIButton *b1, *b2, *b3;
in xxx.m
b1 = ---- similarly for b2 and b3
Now I want that on Click event I store the title in the string. How i can achieve it?
In Other Words:
What function/method would I have to implement in my View Controller class to handle a click event on a UIButton?
...
// Create the request.
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:60.0];
// create the connection with the request
// and start loading the data
NSURLConnection *theConnectio...
Hi,
I'm still sometimes puzzled when it comes to details of Objective-C.
Having this header file:
.h:
AVCaptureSession *capSession;
@property(nonatomic, retain) AVCaptureSession *capSession;
Why is it correct in ObjC to do this:
.m:
// Create instance locally, then assign to property and release local instance.
AVCaptureSes...
When I click a button Its title should be hide. I do't want to set the title to empty string @"". So, How can i do this?
...
I want to create an object from a class that I have created. What I have been trying is to create the object (which can be testingclass) from a method of another class, which I will call classexample, but it says that testingclass is undeclared, which I assumed meant that it was out of the scope of the method, and the method couldn't ac...
How do you detect when a user clicks the green maximize or zoom (+) button on the NSWindow without using the NSWindowDidResizeNotification?
The reason I don't want to use NSWindowDidResizeNotification is because that is also triggered repeatedly as the user clicks and drags to manually resize the window. I have some code that I want to ...
I've seen this in other apps too, so I'm wondering whether there's some canned functionality I'm missing. Is there an interface for the "pull down to refresh" action? If not, what's that called so I can Google it?
...
I've got a simple array of objects..
NSEnumerator * enumerator = [someArray.childItems objectEnumerator];
ChildItem* childItem;
while(childItem = [enumerator nextObject])
{
someArray.total = someArray.total + childItem.SomeAverage;
}
someArray.total is a float, so is childItem.SomeAverage.
When I try to compile, I get:
inva...
I have a text area for user to input something, and I will pass the text as a parameter to server, is there any way / api to ensure the user's text must be valid, even they are not valid, should be treat it as a normal string? (Escaping API?) Thank you.
...