objective-c

UIBarButtonItem ignoring just about every action, ever.

Hello, I have a toolbar, in which is placed a UIBarButtonItem. The selector is targeted at a custom view of mine; a method with this signature: -(IBAction)pop{code} However, clicking it does not cause any action to occur. The buttonitem doesn't appear to respond to the click either, it just stays gray. Linking a UIButton's TouchUpIn...

Memory leak problem with NSMutableDictionary

Hi, i'm writing a program which do something like that: - (void)viewDidLoad { [super viewDidLoad]; propertyList = [[NSMutableDictionary alloc] init]; for (SensorData* _data in _res) { AttributeLine* newLine=[[AttributeLine alloc] init:idx]; [propertyList setObject:newLine forKey:[_data textValue]]; [newLi...

Cmap and Clist concepts in iphone

What is the similar function used for Cmap and Clist in iphone.. Can anyone tell me ? Is this possible to use Cmap and clist in xcode.. Thanks in advance... ...

OpenGLES fails to generate Framebuffers in iPhone thread

Hello, I've got a lovely OpenGLES code slice that renders up images for me. When I want to, I can call a function on it: -(UIImage *)renderToImage; That does a lot of rendering work and returns me an image. This includes the generation of FBOs, textures, etc. Lately, I've found myself needing to enhance this. The image generation ta...

creating back arrow shaped leftBarButtonItem on UINavigationController

I have a view with a navigation controller that I am showing modally and I want to add a back button that is shaped like the default left arrow buttons used in most splitViewControllers. I can create a basic button but I really want the left arrow shape - here is what i have now: /* set title and nav bar items */ self.navigationItem.le...

Odd UITableView height behavior with NSZombieEnabled

I am setting my height: - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { CGFloat rowHeight = 0; if(indexPath.row == [self.items count]){ //more rowHeight = 50.0; //same as moreCell } else{ ChartlyCell *cell = (ChartlyCell*)[self tableView:tblView cellFo...

What happens if a UITableViewCell is not released?

What will happen if the autorelease is removed from cell creation in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { STVCell *cell = (STVCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[STVCell alloc] initWi...

iPhone OS 3 SDK?

How can I install the iPhone OS 3 SDK beside the iOS 4 SDK? Is it possible? ...

Animation Layer Orientation

Hello and thanks for looking at my question. I have an app that supports landscape orientation only (either left or right button). It launches in landscape-left. Great - it launches in correct orientation, and it even reorients views properly (I've customized the supported orientations method) between landscape left and right. Moving o...

Optimize Core Graphics animated drawing (iPhone)

I have a loop that fires a function 30 times per second. The function changes the position of a couple of points that I use to animate. I draw lines through all the points, meaning that the lines will change 30 times per second. I draw these lines to a CGLayer, which then is drawn to a UIView in the drawRect: method. I do this because I...

What are the advantages of armv7 over armv6 when compiling iPhone apps?

If there are any advantages at all... couldn't find anything conclusive in the docs. Apparently armv7 is for newer version of iOS... is it faster? smaller? Better at X? ...

Can't figure out this leak

SettingsView *settings = [[SettingsView alloc] initWithNibName:@"SettingsView" bundle:[NSBundle mainBundle]]; settings.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self.navigationController presentModalViewController:settings animated:YES]; settings = nil; [settings release]; Instruments claims that the following line i...

Multiline CATextLayer

I'm trying to recreate the multiline UILabel with a CATextlayer. Is there a property for CATextLayer, or do I need to create it myself? ...

NSSecureTextField and NSSecureTextFieldCell examples?

Anyone have NSSecureTextField and NSSecureTextFieldCell examples on a core data based application? Simple log in screen would suffice. Here is an example but it is for an Iphone app. http://www.riccomini.name/Topics/Mobile/iPhone/SimpleLoginScreen/ ...

How do you return from a method?

I have this call: (Velocity is a CGPoint) float velY = Velocity.y; velY = [self DoJump:velY :gT]; To this: - (float) DoJump:(float) velocityY:(ccTime) GameTime { return velocityY; } but im getting an error at the call saying incompatible types. Can someone tell me what is wrong? ...

NSTimer: Getting firing to NOT act retroactively.

Hello Everyone, I'm currently using the snippet of code presented below to fire some methods every second. My app is running in the background. The problem is that if the computer wakes up after a sleep period the timer wants to retroactively fire all the methods it has missed. Similar issues come up if the user were to change the Syste...

Nested UIScrollViews: horizontal scrolling

Hello, I'm trying to scroll horizontally through a set of pages, where pages are grouped by two (and can be zoomed both together). So far, my view hierarchy is: One outter UIScrollView that scrolls horizontally. Several inner UIScrollView that contains two pages each, scrolling horizontally too. The problem I have is that swiping qu...

2D Array of UIButtons Isn't Working (Objective-C/iPhone development)

I've made a bunch of UIButtons in a grid and I want to be able to iterate over them easily so I've put them in an NSMutableArray. Like so: // in .h UIButton* button1; UIButton* button2; ... UIButton* button9; UIButton* myButtons[3][3]; // in init function in app myButtons[0][0] = button1; myButtons[0][1] = button2; ... myButtons[2]...

Internal and External IP Address in 10.4

IMPORTANT EDIT It seems I've caused a lot of confusion in this post by differentiating between 'internal' and 'external' IP addresses. Allow me to try to clarify: Internal = PRIVATE IP ADDRESS External = PUBLIC IP ADDRESS The concept of internal and external were completely of my own invention. Apologies. Hey Everyone, With your he...

Objective-C Custom Class with Struct tutorial.

Hello. I'm coming from AS3 to Obj-C, and classes are confusing me. I want to create a ball class as a test, with colour, radius etc. Looking through other people's code I've discovered they use structs to implement them, and this seems like a much nicer method. I've searched but am unable to find a really clear explanation of what st...