Wondering if we have something like vb6 with..End With Statement in Objective-c?
Example:
With Object
.a = "aaa";
.b = "bbb";
End With
I know that there is something called blocks concept, but i am not sure whether it is available in 10.5 Leopard.
Thanks
...
I want to preserve previous drawing in drawRect (the system clears it down each time) and it seems that the way to go is to use a bitmap context and sure enough, this works except that now my colour is gone leaving only black and white instead.
Here is my "static" context
-(id)initWithCoder:(NSCoder *)aDecoder {
...
CGColorSpaceRef co...
I can't seem to find a way to have the console run (to show NSLog comments) in XCode 4. The normal method for the previous version of XCode does not work. Does anyone have an idea of how to accomplish this?
...
How to call finalize method in Obj-c for garbage collection?
...
I am using below code for inserting data in the database. and i am inserting aprox 15000 records but after 245 records it throws the error "Unable to open database"
+(void)addGeoRegions:(const char *)query geoId:(int)geoId geoFatherId:(int)geoFatherId geoName:(NSString *)geoName
geoTypeRegionId:(NSString *)geoTypeRegionId geoZo...
hi all,
I need to write numbers like:
1>yek
123>yeksad o bist o se
1,123>yek hezar o yeksad o bist o se
3,002,001>se milion o do hezar o yek ...
I,m beginner in objective c :)
I write it in c but I want to convert it ,into obj_c! How can i do that?
somthing like:
const char *yekan[10]={"","yek","do","se","chahar","panj","shes...
hi,
I have a question.
If i have a NSArray i can put into a NSDictionary?
If i can, how can do these?
Thanks
...
Hi all,
in an existing project I have tried to introduce Core Data long after the project was created, so its model is already in place.
I have created the xcdatamodel and added my only class to it.
That class should act as a global storage for objects in my application.
The class properly implement NSManagedObject and I have verified i...
Hello guys!
First here's my code:
[_helperView addSubview:_navigationController.view];
[_helperView addSubview:itemView];
[UIView beginAnimations:@"pageFlipAnimation" context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:_helperView cache:NO];
[UIView setAnimatio...
How would I do this, all I want to do is rotate a UIImageView depending on the orientation of the iPhone.
...
Hi,
I want to define one protocol with few properties and need to use those properties in another NSObject subclass. Please give me link or example code. I need that to work with 10.5.
Thanks
PLEASE CHECK THE FOLLOWING SAMPLE CODE
@protocol MyProtocol
@property (nonatomic, readonly) id someObject;
@property (nonatomic, getter=is...
Hello everyone. I want to do something like:
string s1 set to null
s2: "abc"
repeat 10 times
s1=s1+s2
How can I do this in objective-c?
...
How do you adjust the "z"-positions of objects (e.g. sending UIImageViews to the front\back) in the new, integrated interface builder in XCode 4?
...
Hello.
There is a lot of conflicting information on how to open images with Cocoa for use with OpenGL. I want to open JPG and PNG files and save PNG files for my program which uses Cocoa on the Mac version. What is the best way to do these two tasks?
Thank you.
...
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellId];
if (cell == nil)
{
[[NSBundle mainBundle] loadNibNamed:@"ThemeCell" owner:self options:nil];
cell = self.themeCell;
self.themeCell = nil;
}
...
return cell;
My understanding is that self.themeCell = nil; should destroy the object sinc...
Okay this one may be a bit out from left field, but I'm going to try anyways.
A pad is a sort of ambient electronic sound that kind of 'hums'. Something like this .
How can I produce this in code? Using either Processing, OpenFrameworks, C, Objective-C or C++. Keep in mind I haven't been programming for that long.
I will be very imp...
Is there in objective-C any way to see if it is possible to do a certain task without risking crash the application?
Other languages like javascript have
try
{
//Run some code here
}
catch(err)
{
//Handle errors here
}
is there something in Objective-C?
If so, what is the syntax?
thanks.
...
Hello,
My users was to select their times using the 24 HR clock instead of the AM/PM 12 hour clock in my iPhone app. Presently, as far as I can tell, the only way to put the UIDatePicker into 24 HR time mode is from the device's settings. My users only want 24 HR mode for this app, not their entire device.
Does anyone know a way to p...
I have file sharing via iTunes working in my application (reference What's New in iOS 3.2) by enabling the UIFileSharingEnabled key, but according to the documentation:
"Applications that support file sharing should be able to recognize when files have been added to the Documents directory and respond appropriately."
My question is, i...
Let's say that if I read from www.example.com/number, I get a random number. In my iPhone app, I want to be able to continuously read from that address and display the new number on the screen after each request is finished. Let's also assume that I want this process to start as soon as the view loads. Lastly, as a side-note, I'm using A...