Hey everyone,
I'm having difficulty scrolling a UIScrollView instance in my UITableView when I set it as a tableHeaderView.
It still responds to touch events it appears, but doesn't wish to scroll horizontally. I've tried explicitly setting to setUserInteractionEnabled:YES without much luck.
Is there something in particular I need to...
I have a pretty large formula that has to be calculated about 300 times per second. Most of my variables are float, but some variables are just parameters that go into that formula. In some cases, float is not needed. I could use int parameters. But I wonder if mixing int and float types in an calculation would cause the system to cast t...
In Xcode, if I type nsmut then escape, I'm offered a number of NSMutable suggestions (NSMutableArray, NSMutableSet, etc). I use the arrow keys to get the one I want. This forces me to take my fingers off the home keys.
I was wondering if there's another keyboard shortcut to select the next and previous selection in the dropdown menu th...
My class has an NSArray that is filled with objects. In my dealloc method, can I simply call release on my NSArray, or do I need to iterate the array and release all objects first?
...
(BOOL) addticket {
NSString *event=@"max";
NSString *venue=@"tvm";
sqlite3 *database;
databaseName = @"smbhDB.sql";
sqlite3_stmt *addStatement ;
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [documentPaths objectAtIndex:0];
...
I connect asynchronously with server each 5 seconds. The URL is the same, but POST-body is changed each time. Now I create NSURL, NSURLRequest and NSURLConnection from the scratch each time.
I think it'd be more effective to set connection once and just use that one further.
I am a newbie and not sure if that possible. There is no muta...
I need my application to use client's phone-number to generate unique ID for my web-service. Of course a phone-number is unique, but it must be secured. So it can be implemented with symmetric encryption (asymmetric will be later, because leak of resources), but I do not know where to store a encryption-key.
1.
I do not know why, but s...
UITextField *textField;
NSInteger intRollNumber;
I want to take rollNumber as input from the textField and store the value into intRollNumber .
How i do that? Because I am unable to convert the string into integer.
...
I have an interval consisting of two float numbers, and need to generate 20 random numbers in a look that are somewhere inbetween this interval defined by the two floats.
Lets say, for example:
float a = 12.49953f
float b = 39.11234f
float r = //best way to get best randomly numbers between a and b
The random number may be == a and =...
I want to create a set of functions, that make life easier. I use them in about 60% of all project files. I wonder what's the most efficient way of including these in the project.
I think about creating one file where they go in and including this file in every file where I need them. On the other hand, it would be cool if I can include...
I want to make a file that contains useful functions for my project. Well, I know that I can define a function inside my class implementation. But I don't really get it... I mean: I don't want to create a "class", just functions. Or are functions always part of a class? My objective-c knowledge is pretty limited, and my nice big book on ...
I want to create a big file for all cool functions I find somehow reusable and useful, and put them all into that single file. Well, for the beginning I don't have many, so it's not worth thinking much about making several files, I guess. I would use pragma marks to separate them visually.
But the question: Would those unused methods bo...
When an IBAction is called:
-(IBAction) onClick1: (id) sender;
What is passed in the sender? Since it's hooked up through the IB, I'm not really sure. My question is how to get the text of the button to be the passed object (NSString most likely) so that I could call it inside the action implementation.
-(IBAction) onClick1: (id) s...
For me, a library is a collection of classes that do useful things. Typically something, that can be useful in a lot of projects. Is that also the case in terms of objective-c? What exactly is a library there? Only classes that have methods? Or also collections of functions? And do they have to be compiled to be called a "library"? Where...
Is there an easy way to get a time very precisely? I need to calculate some delays between method calls. More particular, I want to calculate the speed of scrolling in an UIScrollView.
...
What is the best way to protect a Cocoa shareware application from software piracy? Are there developer libraries/tools out there for this task?
...
I want to invoke a selector of a method that has the usual NSError** argument:
-(int) getItemsSince:(NSDate *)when dataSelector:(SEL)getDataSelector error:(NSError**)outError {
NSArray *data = nil;
if([service respondsToSelector:getDataSelector]) {
data = [service performSelector:getDataSelector withObject:when withObje...
Hi All,
I am using UIScrollView for zooming an image. While to zoom out the image i want it to be put on double tap.
So my question is can it be possible to zoom out zoomed image on double tap. (i am able to detect the double tap on zoomed view).
Which property we can use for this of Scroll View.
Thanks in advance.
Regards,
Vishal
...
I've tried searching for logarithm + objective-c, but all I get is math test pages from teachers, or explanations what a logarithm is ;)
I've got some measurements that are like 83912.41234 and others are 32.94232. I need to press down this huge spectrum into something between 0 and 100, and that 32.94232 would habe to be at least somet...
Hey there,
I have some code like this:
doDatabaseFetch {
...
@synchronized(self) {
...
}
}
and many objects that call doDatabaseFetch as the user uses the view.
My problem is, I have an operation (navigate to the next view) that also requires a database fetch. My problem is that it hits the same synchronize block and ...