I want to use a category to make a method on the original class available as a property as well.
Class A:
@interface ClassA
- (NSString*)foo;
@end
Class A category
@interface ClassA (Properties)
- (void)someCategoryMethod;
@property (nonatomic, readonly) NSString *foo;
@end
Now when I do this, it seems to work (EDIT: Maybe it does...
i am not sure what i am missing here. I Have a custom UINavigationController and i am trying to add a persistant UIBarButtonItem to the bar.
-(void)viewDidLoad
{
self.navigationBar.barStyle = UIBarStyleBlack;
UIBarButtonItem *bbi = [[UIBarButtonItem alloc] initWithTitle:@"Nope..."
style:UIBarButtonItemStyleBordered
...
Hello, I'm new here and I'm facing a problem. I need to know if it is possible to implement the WS-Security protocol with X.509 certificates on a native iPhone application. I haven't found much information on the web, except this information from Apple about security services.
I just want to ask, is it possible? has it been made before?...
If I instantiate an FBO without binding a rendering buffer or a texture to it, what happens when I draw to it, nothing?
Do I need to associate a rendering target (renderbuffer or texture) to have an FBO do anything? What I'm trying to do is precache some buffers and then merge them later, but that doesn't seem to work at all.
Ideally I...
I'm recording a continuous stream of data using AudioQueueServices. It is my understanding that the callback will only be called when the buffer fills with data. In practice, the first callback has a full buffer, the 2nd callback is 3/4 full, the 3rd callback is full, the 4th is 3/4 full, and so on. These buffers are 8000 packets (rec...
Hi all, What is the main difference between frame work and dynamic library
...
NSString *myString = @"sample string";
NSString *newString = [myString copy];
If I set a breakpoint after these two lines, the pointer for myString is the same as the pointer for newString.
WTF? Isn't NSString copy supposed to return a pointer to a new object? Or am I missing something fundamental about how copy is supposed to w...
Hi all,
I attempted to render a circle in opengl es 1.1 as a test before building a larger program, but it renders as an oval. Here is the code I use to generate and render my vertices:
static const int numVerts = 40;
static GLfloat myFirstCircle[82];
myFirstCircle[0] = 0.0f;
myFirstCircle[1] = 0.0f;
for (int i = 2; i < (numVerts+1...
I'm playing with Objective-C Distributed Objects and I'm having some problems understanding how memory management works under the system. The example given below illustrates my problem:
Protocol.h
#import <Foundation/Foundation.h>
@protocol DOServer
- (byref id)createTarget;
@end
Server.m
#import <Foundation/Foundation.h>
#import ...
Sorry if the question isn't correct, I'm very new in Objective-C.
I understand why this code throw the Warning: "warning: passing argument 1 of 'initWithObjectsAndKeys:' makes pointer from integer without"
NSDictionary *dictNames =
[[NSDictionary alloc] initWithObjectsAndKeys:
3, @"",
4, @"",
5, @"",nil];
Keys and Value...
I want to do something like that:
for (v=1;v=150;v++) {
for (h=1; h=250;v++) {
tile_0%i_0%i.image = [UIImage imageWithData:tmp_content_of_tile]; //1st %i = v; 2nd %i = h
}
}
In the %i should be inserted the current value of "v" or "h"? Is it possible? How is it called?
Greets!
...
Hi Guys,
I added an image to button
UIImage* deleteImage = [UIImage imageNamed:@"Delete.png"];
CGRect imageFrame=CGRectMake(-4,-4, 310, 55);
[btn setFrame:imageFrame];
btn.backgroundColor=[UIColor clearColor];
[btn setBackgroundImage:deleteImage forState:UIControlStateNormal];
[btn setTitle:@"Delete" forState:UIControlStateNormal];
[bt...
http://www.freezpic.com/pics/d63adbfb5faec3ded732dcfee5cc71ef.jpg
in the image one i can enable red arrows inside the inner square ...
http://www.freezpic.com/pics/736e30ef1accf1d174122f2e1b017b8d.jpg
but in the second image i can't enable red arrows inside the inner square.
why?
...
hi,
when i try to convert form utf-8 string to NSString like so:
NSString *s = [NSString stringWithUTF8String:"\U0627\U0644\U0641\U0631\U0646"];
NSLog(@"%@", s);
i get the compile error:
incomplete universal character name
note that it sometime just works fine:
NSString *UAE = [NSString stringWithUTF8String:"\U0627\U0644\U0641\U0...
What will [[UIDevice currentDevice] model] return for "iPad"?
...
I have a external library which includes a core data model, I would like to add a new entity to this model which has a relationship with one of the entities from the library. I know I could modify the original, but is there a way to without needing to pollute the library?
I tried just creating a new model with an entity named the same, ...
I tried [NSString stringWithUTF8String:(const char*)(myWString.c_str())] but that returns a single character string.
This is on the iPhone by the way, if that matters any :)
...
Hi everyone,
I would like to make a subview appear at a requested point on screen. ex: i tap at (200,200) , my subview appears with animation under the point tapped. i know how to get the point , but I don't know how to make this subview appear right there at that point.
Thanks!
...
Hello. I'm trying to send RSA public key from C# server to iPhone, so I could encrypt info on iPhone and decrypt it in C# server. But when I save received public key in iPhone, it's not saved.
I create key in C# like this:
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(1024);
byte [] body = rsa.exportCspBlob(false); ...
I have an XML schema that defines my data model. I would now like to have Objective C source files generated from the XML schema. Does anyone know how to accomplish this?
...