cocoa-touch

Is TA-lib.org support on iOS on iphone?

Hello everyone, I would like to add Technical analysis support to my financial project on iphone. And I found TA-lib on www.ta-lib.org, this library supports many indicators I need. I would like to ask: Can I use ta-lib on my iphone development? And how I can do it, because this library is written in C language? I knew that Cocoa can c...

Core Data - accessing objects returned from fetch EXC_BAD_ACCESS

The following is implemented as a class method in a category on one of my managed object entities, with a bunch of other operations: + (NSArray*)newArrayOfAllOtherBibs { NSManagedObjectContext* moc = [(MyAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext]; NSFetchRequest* fetchRequest = [[NSFetchRequest ...

What is the best (designwise) way to pass an NSArray of model objects to a view object?

I have a BankAccount model class that contains data like account number, bank name, transactions, etc. The transactions are each instances of the Transaction class and contained in the transactions NSArray. I also have a BankAccountView that displays all this in a single view. Right now I'm passing all the data as separate variables (ie...

How to Read Number of lines in UITextView

Hi friends.. I am using UITextView In my View , i have requirement to count number of line contained by textview am using following function to read '\n' . However this works only when return key is pressed from keyboard , but in case line warapper (when i type continuous characters i wont get new line char ) . How do i read new char wh...

Cocoa thread synchronisation when using [ALAssetsLibrary enumerateGroupsWithTypes:]

I have recently, like a few people, discovered that [ALAssetsLibrary enumerateGroupsWithTypes] likes to run its blocks on another thread. What a shame that Apple didn't document that :-) In my current circumstance I need to wait for the enumeration to complete, before the main thread returns any results. I clearly need some sort of thre...

iPad landscape modal view incorrectly sized

I have a iphone app where I want to present one of the views modally in landscape mode only and have set the code below its view controller. All works fine on the iphone (its intended platform), but when run on the iPad for demonstration, the left hand edge of the landscape view is truncated by approx 10 pixels. i.e. it looks like the di...

Core Data Relationship Failing to Load To-One Relationship

I have a to-one relationship between a Document and Settings model: On creation of a Document, a corresponding Settings object is created. The models are persisted to core data. When relaunching after creating a few documents (and the associate settings), the application reloads a list of documents to select using: // Load delegate ...

PreferencesViewControllerDelegate

I found this in some example code I downloaded #import "PreferencesViewController.h" @class MetronomeView; @interface MetronomeViewController : UIViewController <PreferencesViewControllerDelegate> { MetronomeView *metronomeView; } @property (nonatomic, assign) IBOutlet MetronomeView *metronomeView; - (IBAction)showInfo; @end ...

How to initalize a button using editButtonItem

I have a table view , within that tableview I'm setting up a section header, which I want to contain an edit button. I know there is a built in support for something like that if my viewcontroller is part of a navigation chain, but is there a way to do it without it, or the only option is to set a button manualy and trigger an action tha...

iOS Application Terminates After Exception Thrown in UITableViewDataSource Method

Having meticulously followed the examples and instructions in the Table View Programming Guide for iOS about the proper order in which UITableView delegate and data source methods are called, I thought I had a good idea of how to implement the “handshake” shown in Figure 7-1 and the list that follows, but apparently not. Here's the code...

UISearchBar is not displaying Scope Bar

I use the following code to display a UISearchBar with a Scope Bar. UISearchBar *searchBar = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, 320, 45)]; searchBar.barStyle = UIBarStyleDefault; searchBar.showsCancelButton = NO; searchBar.autocorrectionType = UITextAutocorrectionTypeNo; searchBar.autocapitalizationType = UITextAutocapit...

With & Without UITextFieldDelegate?

I am curious about conforming a class to UITextFieldDelegate, in the past I have always added it to enable access to methods defined within the protocol. However this last time I forgot to add it, only realising later that it was missing. My question is why does it work with or without, I thought it was needed to correctly access the pro...

expected identifier error in xcode

i get this error "expected identifier before 'OBJC_STRING' token" on this line of code: - (id)initWithNibName:(NSString *)@"Landscape.xib" bundle:(NSBundle *)mainBundle { and im not sure why, can anyone help? ...

Expected expression before UIDeviceOrientation in xcode

So i am trying to make a game that will load a specific XIB file according to the device's orientation at launch. my code looks like this: - (id)initWithNibName:(NSString *)nibName owner:owner bundle:(NSBundle *)bundleName { if (UIDeviceOrientation == UIDeviceOrientationLandscapeLeft || UIDeviceOrientation == UIDeviceOrientationLand...

How To draw a rounded corner to once side (one corner) of my uiview

HI i want to draw a rounded corner to once side (only one corner) of my UIView only one corner to be rounded and others must not.. any one help me.... ...

i Want two UITextFields but with different delegate methods

I have a view with 2 textfields in it. The first one should get URL's, the second words to be searched on google. The problem is that the following method -(BOOL)textFieldShouldReturn:(UITextField *)textField; designs the behavior for both of them. What should I do in order to be able to design two behaviors just as I mentioned above (...

Overlapping images in cocoa touch applications

I programatically created a box. It can be moved around the screen. The problem is that there are buttons on the screen I made in Interface Builder. When the box moves over a button, it covers the button. How can I make it appear behind the button? ...

Why bother with releasing memory in viewDidUnload and dealloc

Aren't these methods called when the app is about to be shut down? If so, then won't the memory be all cleared out anyway? ...

Can I synchronize many records from sqlite database from iphone to mysql database on server.

Hi everyone, Currently I am developing an iPhone app with sqlite database, this database just has only one table with many records. And my server is using MySQL database. I would like to ask: Can I send many records from sqlite database to MySQL database to update the table in MySQL database. Because I think I can do update with just o...

If I use the NSXMLParserDelegate, will my application crash or be rejected if I target OS 3.1?

I am using the iPhone 4.0 SDK for my development and the NSXMLParserDelegate protocol in my code. I am planning to make this work on 3.1 as well by making the deployment target 3.1 and base SDK 4.0. Since NSXMLParserDelegate is only on 4.0 and above will it work on iPhone 3.1? Even if it works will Apple reject the app? ...