I am working on an iPhone application in which I have to design a GridView, I have searched on google + stackoverflow and found that one possible solution is AQGridView, I have tried it but all of its examples are not working in XCode 4.1.
The error I am facing is: Expected ':', ",", ";", "}" or 'attribute' before '_dataSource'.
The line causing this error is id<AQGridViewDataSource> __unsafe_unretained _dataSource; (line no 100 in AQGridView.m).
What I am trying to achieve is to display buttons in 2x4 table.
Any Help will be appreciated.
Thanks
Edit
Ok, so I have downloaded Xcode 4.2 as some guys suggested in comments, now the previous errors are gone but I am having a new on __bridge Undeclared (first use in this function), the line causing this error is line no 961 in AQGridView.m (Source Code)
Thanks
First create a gridview objective class.write own delgate and datasource methods as tableview in it.call it in the viewcontrler class.
I think, on XCode 4.2 this is not an issue.
XCode 4.1 does not know __unsafe_unretained.
So just define it in some global project header:
#define __unsafe_unretained
and try to compile again.
Related
I'm trying to build a project that I downloaded from git and I got some errors in the Xcode beta 9.
I noticed that there are some things that are deprecated like ARWorldTrackingSessionConfiguration so I changed them and they were fixed. But I get an error that I can't fix, this is the part from the code:
matrix_float4x4 projectionMatrix = [frame.camera projectionMatrixWithViewportSize: nativeSize
orientation:[[UIApplication sharedApplication] statusBarOrientation]
zNear:(CGFloat)unityCameraNearZ
zFar:(CGFloat)unityCameraFarZ];
I could not fix this and I don't know what to do.
the error for that is this:
No visible #interface for 'ARCamera' declares the selector 'projectionMatrixWithViewportSize:orientation:zNear:zFar
Hope you can help me with this issue?
Thank you.
First of all you should update your XCode from beta to a stable version.
As for
No visible #interface for 'ARCamera' declares the selector 'projectionMatrixWithViewportSize:orientation:zNear:zFar
Here is official Apple documentation about ARCamera class which shows that there is no method projectionMatrixWithViewportSize:orientation:zNear:zFar and it's most possibly was changed to projectionMatrixForOrientation:viewportSize:zNear:zFar:. Signatures of this two methods requires the same parameters, so it won't be problem to replace the old method with a new one.
I am developing an app for Mac, I am getting a weird issue. When ever i reload a row and for a particular column when the reload code executes i am getting a sound output from my mac.
Below is the code
myTableView.reloadDataForRowIndexes(myTableView.selectedRowIndexes, columnIndexes: NSIndexSet.init(index: myTableView.columnWithIdentifier("source")))
I have a column with identifier "source", When ever i try to reload and after the execution of the above line i am getting sound in my mac.
I am using Xcode 7.3, OSX 10.11.6
Have you tried setting a breakpoint on NSBeep()? My gues would be that the table, or some other code trigger by the update is sending an error message.
Finally i found the issue. I debugged the code in depth and found the root cause.
Sound is coming when ever i am calling below code, here sourceTextField is a NSTextField. I commented this code and every thing is working fine.(i can directly give the value to text field like sourceTextField.stringValue.)
sourceTextField.insertText(itemText)
Thanks to all of you who made some time to write a comment/ post a message, Sorry for bothering you all guys.
After successfully implementing the MFMailComposeViewController in my app, run it in the simulator and my iPhone, where it still works fine, it just crashed.
I get 5 MFMailComposeViewController.h issues: Cannot find protocol declaration, Expected identifier or '(', etc,...
My Controller header includes:
MessageUI/MessageUI.h
MessageUI/MFMailComposeViewController.h
and conforms to protocol:
#interface DetallViewController : UIViewController < UIActionSheetDelegate,
MFMailComposeViewControllerDelegate>
I've tried to:
1) remove and add the framework
2) Restart the device and Xcode as suggested in many posts
3) Create a separate controller to handle MFMailComposeViewController
After 3 days with this issue I'm completely stuck on this. As you can imagine, any help would be appreciate.
I would think this is a kind of reference issue since it appears whether the framework is selected or not.
Thanks in advance
Just to anybody it may help, I finally found the issue:
A missing #end in an imported header.
Thanks to everybody for the efforts.
im compiling my app , which is working great and i wanted to ask you 2 questions
1. im getting about 14 warnings like that
no '-addCategory' method found
which i know how to solve but even after i cleaned everything added the function to the header file and compile again it's still there i cant get rid of it.
2. im pretty new in coding and the code is not GREAT but it's ok how do i know apple will accept it ?
thank you very much !!
Declare that method in .h file
Implement that method in .m [implementor of .h] file .with the same signature.
Clean in once.
And try..
It should work..!
i followed the tutorial -> http://icodeblog.com/2008/09/02/iphone-programming-tutorial-creating-a-todo-list-using-sqlite-part-2/
but the thing is my uitableview isnt showing anything from database!! i did an nslog and able to query the data..so what could be the possible error?
i went through line by line with the source..but still can't find any problem..anyone tried the tutorial and face similiar problem as me?
Delegate and Datasources are connected?
I downloaded the sample code and it works with no problems under OS 3.0 and 3.1.2 and
http://icodeblog.com/wp-content/uploads/2008/09/todo-part-21.zip