I have created app for cover flow of menus.i have followed a tutorial including tabku library in my project.I've done all the steps which is in following link
http://www.applausible.com/blog/?p=657
But it throws error as ' file not found'.Here is my code below.
#import <UIKit/UIKit.h>
#import <TabkuLibrary/TabkuLibrary.h>
#interface ViewController :UIViewController<TKCoverflowViewDelegate,TKCoverflowViewDataSource>{
TKCoverFlowView * Coverflow;
NSMutableArray *arr;
}
#end
I've followed so many tutorials and ended up in the above link...Can anyone help...
The library is actually called Tapku and I ran into the same problem. I ended up adding $(SRCROOT)/tapkulibrary/src to my search header path, and then got a different error: "Interface Builder is unable to open documents of type CocoaTouch XIB." Fortunately the above error was fixed thanks to another SO thread: Interface builder is unable to open documents of type iPad XIB
Related
I have a OCR application. I'm using the tesseract api library for my app. But when i run the application, it will show the error (error: ISO C++ forbids declaration of 'TessBaseAPI' with no type?).
Here is myt.
#interface OCRViewController : UIViewController <UIImagePickerControllerDelegate,UINavigationControllerDelegate>{
UIImagePickerController *imagePickerController;
//Getting error in this line.
TessBaseAPI *tess;
UIImageView *iv;
UILabel *label;
}
You'll have to add the tesseract namespace, either with:
using namespace tesseract;
or:
tesseract::TessBaseAPI *tess;
I have tried out following solution this really works
Please rename
main.m ==> main.mm
ViewController.m ==> ViewController.mm
AppDelegate.m ==> AppDelegate.mm
This means that straight C++ style header files will no longer be included (by reference) in your plain Obj-C source.
Hope that helps, and makes sense. If this helps then please give me thumbs up.
Thanks,
I'm trying to use the open source STHorizontalPicker library to implement a horizontal picker to my project but when importing the .m and .h files from GitHub to my project I'm getting multiple errors when compiling.
Does it require any special implementation?
I'm simply copying the .h and .m and adding to the project. Error are like : property 'cornerRatius' cannot be found in forward class object 'CALayer'...
Do I have to import some class to those files ?
Thnaks in advice.
Do I have to import some class to those files?
Yes, you'll need Quartz.
#import <QuartzCore/QuartzCore.h>
So after an hour of research, I've found that most people seem to agree that the function at http://www.thismuchiknow.co.uk/?p=71 is the way to go for implementing a Haversine function into an iPhone project for ordering results by distance when you have a database full of latitudes and longitudes. There seems to be little help on how to actually include it in your project though, and I'm having no luck on my own.
No matter where I add the function into my ViewController.m file, I get the error expected ')' before '*' token. Some people have mentioned you need to put static void distanceFunc(sqlite3_context *context, int argc, sqlite3_value **argv); into your .h file, but I get the same error there too.
Can anyone provide a brief example of including this function in an iPhone project?
your can use this,
+(void)distanceFunc(sqlite3_context *context, int argc, sqlite3_value **argv);
or change .m extention of your viewController file to .mm.(You can try this one also)
updated
+(void)distanceFunc:(sqlite3_context *)context arg1:(int)argc arg2:(sqlite3_value **)argv;
try updated one.
Thanks,
There should be no problem with inserting the code in the link you gave anywhere in a .m file. If you are getting the error on the function definition line, it is likely that the compiler doesn't know what an sqlite3_context is. This means you haven't include the sqlite3.h header in your .m file.
Ok, so my problem was a combination of not using #import <sqlite3.h> and not adding the libsqlite3.0.dylib framework to my project. As far as where to place the function from http://www.thismuchiknow.co.uk/?p=71, I put it between my #import tags and #synthesize in my controller's .m file, appearing just as it does in the blog post.
In my iPhone app, I am making an access to the webserver to fetch the data.
Here I am using JSON to retrieve the data from database.
I get a warning that says:
NSString may not respond to '-JSONValue'
How to resolve it?
Add this #import "JSON.h" at the top of your .m or .h file.
Have you tried to add JSON Library to your project and import it
#import "JSON/JSON.h"
You probably just miss the include to your JSON library
I am trying to localize a class (.h & .m files) in my application. I made the same operation as when I localized my interface (xib -> Get info -> make file localizable). I created a second .h and a second .m file, and I made the modifications I needed for the new location. Great !
But it just doesn't work...
I get the error:
duplicate symbol _OBJC_METACLASS_
Does anyone have a clue ? Thanks a lot !
you are just on the wrong path..
For localization you need not create separate .m & .h files.Only Xibs are to be created.
Other than that you have to create separate Localizable.strings file for each localization.
For more understanding just chk out this link http://www.switchonthecode.com/tutorials/a-simple-localization-example-for-the-iphone
It contains the link for downloading the sample code also.