Ive been trying to get my app working with parse and i cannot get the test to work. I think it might be due to viewcontroller.m not recognising "PFObject". I need to add this into the view controller as the instructions say on parse.com but i cannot get it to work.
Has anyone had this problem or have any ideas?
Thanks!
Have you done #import <Parse/Parse.h> at the top of your view controller.m?
Related
I have followed Jojodmo's guide on how to do this but came up with two errors. I've played around with the codes a lot but I'm not quite sure on how to fix these errors. Any suggestions?
You need to declare in the interface of your view controller that it is conform to those protocols.
#interface ELViewController <SKProductsRequestDelegate, SKPaymentTransactionObserver>
Following a tutorial exactly, I created files that extend UITableViewController. The problem is that his uitableviewcontroller.m files is filled with pre written code (like the viewDidLoad), while mine is completely blank! Both our uitableviewcontroller.h files all have the code of
#import <UIKit/UIKit.h>
#interface ChemTable : UITableViewController
#property (strong,nonatomic)NSMutableArray *Chemarray;
#end
For learning purpose the auto-generated method are of least use(its perfectly ok even if You remove it). even you can create app without them....."viewDidLoad" is the one very necessary method that runs when the view is loaded, but when you go for real apps you will surely use some of auto-generated methods.
Extra -->I think you also also should see this:
ViewDidLoad - Called when you create the class and load from xib. Great for initial setup and one-time-only work
ViewWillAppear - Called right before your view appears, good for hiding/showing fields or any operations that you want to happen every time before the view is visible. Because you might be going back and forth between views, this will be called every time your view is about to appear on the screen
ViewDidAppear - Called after the view appears - great place to start an animations or the loading of external data from an API.
ViewWill/DidDisappear - Same idea as the WillAppear.
ViewDidUnload/Dispose - Available to you, but usually not necessary in Monotouch. In objective-c, this is where you do your cleanup and release of stuff, but this is handled automatically so not much you really need to do here.
I made a UIScrollView inside a UIViewController I have like 5 ViewControllers my problem is in the 4th one.
The UIScrollView I made does scroll when I put notting it it (so no label no button, no objects at all) but when I put even a label (or anything) in the UIScrollView it stops working.
Edit:
I have try'd making the same thing in a new project, for some reason it does work I think it has something to do with the fact that it is in the 4th ViewController and the new one I made, was made, in the First automatically made viewcontroller.
I do not yet have a answer please help.
My code:
viewcontroller.h
#import <UIKit/UIKit.h>
#interface viewcontroller : UIViewController
#property (weak, nonatomic) IBOutlet UIScrollView *ScrollerMdon;
#end
viewcontroller.m
#synthesize ScrollerMdon;
- (id)initWithNibName:(NSString *) nibNameOrNil bundle:(NSBundle *) nibBundleOrNil
{
self = [super initWithNibName: nibNameOrNil bundle:nibBundleOrNil];
if(self)
{
}
return self;
}
-(void)viewDidLoad
{
[ScrollerMdon setScrollEnabled:YES];
[ScrollerMdon setContentSize:CGSizeMake(320,1000)];
[super viewDidLoad];
}
#end
In xcode viewcontroller connection inspector my outlet ScrollerMdon is connected with *Scroll View(*which I inserted in my viewcontroller)
In xcode UIScrollView connection inspector my Referencing outlet ScrollerMdon is connected with viewcontroller.
Please help me I have been trying to solve this for 5 hours.. I can't stand it anymore.
Edit:
I try to make it possible for a single viewcontroller to hold like 17 textboxes I see no other way than doing it with a UIScrollView if there are any suggestions I would be really happy.
Edit2:
I have try'd to make it all aggain putting the same class on a different view controller and the other way around, I kinda rewrote the code and everything it's exactly the same as what I made in the other project but it does not work.(when an object is inside..)
2 foto's of my program.
Srry for the small and bad images, for some reason they moved without my permision but it is enough information I guess.(I use VMWare 8 with os x leopard on it)
foto 1
foto 2
Me Scrolling without items:
imgur.com/cd16I
Me desperately Scrolling with items:
imgur.com/hNUl1
Since I can only post 2 hyperlinks you have to open these yourself.
PS. please upvote this if you do not know the answer for I need a answer and there will probably be more viewers if it gets upvoted, ty.
Edit3:
I am now copying my entire code and build of the app in a different project hope this wil work :S.
I had the SAME exact problem that I ran into yesterday. Drove me nuts for hours... This was a brand new project that I just started like a week or so ago.
The thing is, I had another project that had the exact same setup essentially that I had started last summer that has no problems. Tabbed application, VC that has a UIScrollView with many uiviews, labels, images etc... works great.
So what changed from that project to this project? The version of Xcode that I started the project out in. The project from last summer did NOT have the AutoLayout enabled as an option. This new one did ( Xcode 4.6 ).
If I turn off "Use AutoLayout" for the entire project it works fantastic.
In the Utilities panel, click on the File Inspector tab. In the section for "Interface Builder Document" you'll see a checkbox for "Use AutoLayout". De-select that and re-build your app. Just found this trick not more than 10 minutes ago for my own project -- works great.
Hope this works for your project... good luck!
I found the solution it might not be the perfect solution but it works.
The problem seemed to be somewhere in my first project since I could make it work in other projects,
so I copy'd my entire project to a different project and this way it worked.
This solution won't explain what is wrong but I think it will solve your problem.
Copy the elements from the new project you created to the old one and replace the affected view controller. Copy also the class.
There must be something wrong with your connections but with the info you provided is impossible to check.
If that doesn't work then it must be something in the navigation (doubt it) or in some custom code you have on the class (very difficult if all the code you have is in the viewDidLoad as you've shown).
I'm trying to use the ZBar SDK to create an embedded QR Code reader just like shown in the example here: https://github.com/twotoasters/zbar (the Embeded Reader example)
The only difference is that I'm using it in storyboards. I tried copying the code into my application and everything seems to be fine, until I actually try to use it.
I'm working on a simulator, so the ZBarCameraSimulator is initializing and showing it's text, but when I try the "two finger click" (checked the Multitouch Option in the Subview attributes) it seems to ignore the action.
I guess there is a delegate or a handler missing, which was not required in with XIBs but is necessary within the Storyboards.
Anybody got any clues? Would be thankful.
Ok, looks like I found the solution,
I was assuaging the readerView to a (weak, nonatomic) IBOutlet property, while the XIB project used "retain" option. I changed the option to strong (as what I understand from ARC, retain shouldn't be used with it) and it started working.
I am also using this with storyboard and have had no trouble having the simulator recognise the two finger click. I do this by pressing Option+Mouse and holding it for a second.
I do however have follow on issues where the scanned image does not seem to be processed, but I think that my be due to a delegate issue.
My iPad app was working fine until I opened up IB and started editing the interface. Now, my application:didFinishLaunchingWithOptions isn't getting called. I understand it's an optional function and it gets skipped if it doesn't exist, but in my case it does. What are some reasons that application:didFinishLaunchingWithOptions method could get skipped?
I should note that I'm building with the iPhone OS 3.2 SDK.
Thanks in advance for your help!
UPDATE: I fixed it, please see my answer below
Are you sure that class has been set as the application delegate of the app?
(source: xanga.com)
And also make sure the "File's Owner"'s delegate has been linked to "App Delegate".
(source: xanga.com)
Well it turns out, for an unknown reason, I had a "view" view object as a child of my RootViewController in IB that didn't serve any purpose except to hold my a TableView view object and a DatePicker view object. I thought it was harmless, but when I removed it in IB and programmatically added the TableView object and and DatePicker object, suddenly this problem went away. If anyone has any ideas why this is, I'd would love to understand it.
Thanks, everyone!