UIMenuController and profiling bug?

2011-12-27 Thread Alejandro Marcos Aragón
Hi everyone, I tried to find some info on the internet about an issue that I'm having but so far no luck. I'm customizing the behavior of UIMenuController, but then when I try to profile the code to find memory leaks, the UIMenuController doesn't show up even though I see no issues without prof

chaining animations

2010-06-21 Thread Alejandro Marcos Aragón
Hi everyone, Can someone point out what is the standard way to chain animations? I'm trying to animate several UIViews (one after the other) that are container into an NSMutableArray, and at this point I'm just doing something like the following: - (void) insert { if ([array co

personalized segmented control, like the copy & paste one

2010-06-06 Thread Alejandro Marcos Aragón
Hi all, I was trying to find in the documentation if it is possible to use a segmented control like the one used for copy & paste (with a little arrow pointing to the field you're editing), but couldn't find anything. Is it possible to do such a thing? If so, is it difficult to implement? Do I

Re: detecting touch and hold vs touch in UIButton

2010-06-06 Thread Alejandro Marcos Aragón
:11 AM, Matt Neuburg wrote: > On or about 6/6/10 8:54 AM, thus spake "Alejandro Marcos Aragón" > : > >> If the user just taps the button, a UISegmentedControl appears, thus this >> target is in touch up inside. Now, if the user taps and holds, another type >> o

Re: detecting touch and hold vs touch in UIButton

2010-06-06 Thread Alejandro Marcos Aragón
d touchCancelled should kill the >> timer if the timer is exists and is not invalidated. If you hit the timer >> you are being held. When the timer is hit you restart the timer again for >> the next check. >> >> Scott >> >> >> On Jun 4, 201

Re: detecting touch and hold vs touch in UIButton

2010-06-06 Thread Alejandro Marcos Aragón
Hi Matt, Thanks for your answer. Still, I don't think that solves the problem. It is not just the difference in time what matters. If the user just taps the button, a UISegmentedControl appears, thus this target is in touch up inside. Now, if the user taps and holds, another type of control app

detecting touch and hold vs touch in UIButton

2010-06-04 Thread Alejandro Marcos Aragón
Hi all, I've been trying to detect touch and hold vs touch on a subclass of UIButton. I basically accomplished that by doing the following: I first add the following when the button is created: [button addTarget:self action:@selector(sourceSelected:) forControlEvents:UI

Re: selecting a row of a UITableView programatically

2010-05-27 Thread Alejandro Marcos Aragón
> Luke > > On May 26, 2010, at 5:24 PM, Alejandro Marcos Aragón wrote: > >> Hi all, >> >> Can someone tell me why the following code doesn't work? >> >> >> - (void) showInfo { >> >> FlipsideViewController *controller =

selecting a row of a UITableView programatically

2010-05-26 Thread Alejandro Marcos Aragón
Hi all, Can someone tell me why the following code doesn't work? - (void) showInfo { FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil]; controller.delegate = self; NSUInteger indexes[2] = {0,3}; NSI

Re: UITabBar as a UISegmentedControl???

2010-05-26 Thread Alejandro Marcos Aragón
y be possible, it doesn't sound like a good idea. The big > question it raises is why do you want to do this? As you have of course > observed, we already have UISegmentedControls. What are you trying to > accomplish? > > Luke > > On May 25, 2010, at 6:23 PM, Alej

UITabBar as a UISegmentedControl???

2010-05-25 Thread Alejandro Marcos Aragón
Hi all, Is it possible to use a UITabBar as a UISegmentedControl object? I mean, instead of changing a view when the user selects an item in the uiTabBar, send an event that tells the index of the item that was pressed and therefore execute an action. Then deselect the whole UITabBar. Any sugg

how to bring up a keyboard as in UITextField

2010-05-23 Thread Alejandro Marcos Aragón
Hi everyone, I'm trying to reproduce something similar to what happens when the user touches a UITextField. I want a keyboard to show up to half the screen. I created my own xib file with the keyboard, and everything seems to work fine, except that the upper half of the screen is not transparen

Re: singleton design pattern

2010-05-19 Thread Alejandro Marcos Aragón
Static variables inside member functions are initialized only once, static variables therefore keep the state of the variable in repeated calls. aa On May 19, 2010, at 6:37 PM, Graham Cox wrote: > > On 20/05/2010, at 7:35 AM, Abhinay Kartik Reddyreddy wrote: > >> everytime you ask for a uniqu

Re: singleton design pattern

2010-05-19 Thread Alejandro Marcos Aragón
t;> >> On 18 May 2010, at 23:28, Alejandro Marcos Aragón wrote: >> >>> Hi all, >>> >>> I've been staring at this piece of code now to try to find out what's wrong >>> with it and I can't think of anything at this p

Re: singleton design pattern

2010-05-19 Thread Alejandro Marcos Aragón
PM, Mike Abdullah wrote: > > On 18 May 2010, at 23:28, Alejandro Marcos Aragón wrote: > >> Hi all, >> >> I've been staring at this piece of code now to try to find out what's wrong >> with it and I can't think of anything at this point

singleton design pattern

2010-05-18 Thread Alejandro Marcos Aragón
Hi all, I've been staring at this piece of code now to try to find out what's wrong with it and I can't think of anything at this point. I'm trying to have a single instance of an NSMutableDictionary inside a class: // in .h file @interface ClassA : NSObject { } + (NSMutableDictiona

Re: creating a UITableView on an "Utility application" project

2010-05-17 Thread Alejandro Marcos Aragón
; > navController.modalTransitionStyle = > UIModalTransitionStyleFlipHorizontal; > [self presentModalViewController:navController animated:YES]; > > [navController release]; > > Regards, > Matej Bukovinski > > On 17.5.2010, at 19:07, Alej

Re: creating a UITableView on an "Utility application" project

2010-05-17 Thread Alejandro Marcos Aragón
Hi Fritz, thanks for your reply. I actually did what you said, that was not the problem. It seems that the "Utility Application" doesn't have a UINavigationController, so the pointer I was trying to push the view on was nil. I'm trying to figure out how to change the code of the "Utility Applic

Re: creating a UITableView on an "Utility application" project

2010-05-17 Thread Alejandro Marcos Aragón
Hi Matej, Thanks for your answer. I checked what you said and indeed the pointer is null. What I don't understand, is how this application doesn't have a UINavigationController. How am I switching between the front and back view if there isn't a navigation controller? I used the code you sugges

Re: new to cocoa

2010-05-14 Thread Alejandro Marcos Aragón
0, at 6:36 AM, Alejandro Marcos Aragón wrote: > >> Hi all, >> >> I'm new to Cocoa, and I couldn't find information about an error that I'm >> getting on the web. I'm trying to create an NSMutableDictionary where the >> keys are of type UI

new to cocoa

2010-05-13 Thread Alejandro Marcos Aragón
Hi all, I'm new to Cocoa, and I couldn't find information about an error that I'm getting on the web. I'm trying to create an NSMutableDictionary where the keys are of type UIButton*: // create button for unit UIButton* unitButton = [[UIButton al