Hi Caroline, Thanks for your reply~ I think I understand the steps which you mentioned, because I can run in Other Plugin in iOS Simulator smoothly.
I have added uikit.mm into the GiderosiPhonePlayer project but it gives me a warning of "gideros.h file not found " I have attached the screen shot too.
The gideros.h file might not be included in your project. I can't remember if I had to do this.
But you can find it in the subfolder somewhere - I think it's in the Plugins folder in the GiderosiPhonePlayer project folder. Just drag it into Xcode.
You might have to repeat for all the other ones it complains about.
Thanks Caroline, I make it finally and they are the things what I'm looking for and Thank MikeHart for sharing this plugin.
Actually, I just switched from Corona and found there are many bugs and some people suggested to use Gideros. Feel like Gideros will be my final tool to create an app~
Hi, You should also put .mm file near to "gideros.h" file (at Plugins directory)
? is that a requirement for some reason? I just realised that on disk I've got my plugins in the Classes folder, while my .h files are in the Plugins folder.
In fact my uikit.mm is not even in the same iPhoneGiderosPlayer folder - it's currently located in a completely different folder (I'm not working on it at the moment, so it's not in the working folder).
Recently ,I use gideros ,but now I have some trouble with it. Actually, I don't develop game using gideros, I would like to develop app with UIKIT plugin, 1.how to use textfield implement multi-text-input ,
MikeHart's UIKit plugin is a first release - in my opinion I don't think that it is ready for a full-on UIKit app. One of the outstanding problems is memory management - that the plugin does not allow hierarchies of views. A simple thing like adding a view to the application's root view is OK, but adding a view to that view becomes difficult.
(It is possible to add subviews to views by uncommenting the {"addView", addView}, line on line 254, but when the subview is removed from the view, if I remember correctly, the associated View class is not removed from memory. I have been experimenting with ways to get around this, by having the binding on the Lua side rather than the C side, as Lua has automatic garbage collection, but my skills are not good enough to go public with this. I would welcome a forum discussion on how to do this though.)
4. For that reason, you can't currently implement UINavigationController, as that requires a subview hierarchy.
3. Thank you for the fix - I've updated it on github.
2. I don't know what you mean by this.
1. The UIKit plugin only has UITextField implemented. Multi-line is done with UITextView. It shouldn't be too hard to implement UITextView, using UITextField as a pattern.
@MikeHart - it's only when you come to remove the views that it's problematic - adding them is fine. So yes, if the app has static views, then it works great.
There was a debugging statement left in there - not sure how that happened. It was possibly me when I was messing around with stuff. Sorry.
No need to be sorry for. I was just wandering why there was a problem with the statusbar. It is a long time since I had work with/on that plugin but before the statusbar could be hidden and showing perfectly.
hi @Caroline, Thank you for your answers. I found the UIImageView is not implement, so I want to implement it, I add some code about UIImage in UIKit.mm, the following code
Usually http post body data is string , such as a = 1 & b = 2 & c = 3, but sometimes we'll upload a binary file, such as sending a tweet with a picture, the http the post body t data necessary to use the multipart / form-data encoding mode, this is w3 specification, RFC-1341
@louis, I may be missing something, but it seems to me that, in the create() method, you're leaking memory (the Cocoa way): you shouldn't need to "retain" the view, as it was created using an "alloc/init" combination, so the additional retain would prevent it to be dealloc'ed at a later release.
You'll also need to send the correct path of the image, which is in the player's Resources folder, and I can't remember for the moment how to access it. I thought it was "|R|filename", but that doesn't seem to be working.
About the "retain" issue. I remember thinking the same thing a while ago, because all the UIKit items do it. But I *think* I eventually went "Oh - that's why", but my memory is cloudy.
You'll also need to send the correct path of the image, which is in the player's Resources folder, and I can't remember for the moment how to access it. I thought it was "|R|filename", but that doesn't seem to be working.
About the "retain" issue. I remember thinking the same thing a while ago, because all the UIKit items do it. But I *think* I eventually went "Oh - that's why", but my memory is cloudy.
as you said,I have changed that,I also changed the resource fold problem
@louis - also, to be consistent, I think the names of the classes ought to be ImageView and ImageViewBinder, as there is a UIKit class called UIImage as well as UIImageView. It's a bit of work though, so you might not want to.
@louis - also, to be consistent, I think the names of the classes ought to be ImageView and ImageViewBinder, as there is a UIKit class called UIImage as well as UIImageView. It's a bit of work though, so you might not want to.
use method :g_pathForFile(file_name) it auto convent image path
in my app fold : : ~/Library/Application Support/iPhone Simulator/4.3.2/Applications/3C1DF625-D9A4-4AE4-8E20-29ECB828B63B/Documents/TestUIImage/resource
Comments
Thanks for your reply~
I think I understand the steps which you mentioned, because I can run in Other Plugin in iOS Simulator smoothly.
I have added uikit.mm into the GiderosiPhonePlayer project but it gives me a warning of "gideros.h file not found " I have attached the screen shot too.
Thanks
Kit
But you can find it in the subfolder somewhere - I think it's in the Plugins folder in the GiderosiPhonePlayer project folder. Just drag it into Xcode.
You might have to repeat for all the other ones it complains about.
This is what my Xcode looks like:
Actually, I just switched from Corona and found there are many bugs and some people suggested to use Gideros. Feel like Gideros will be my final tool to create an app~
In fact my uikit.mm is not even in the same iPhoneGiderosPlayer folder - it's currently located in a completely different folder (I'm not working on it at the moment, so it's not in the working folder).
@Caroline
Recently ,I use gideros ,but now I have some trouble with it.
Actually, I don't develop game using gideros, I would like to develop app with UIKIT plugin,
1.how to use textfield implement multi-text-input ,
2.UrlLoader post method how to upload image file ? post content type is The Multipart Content-Type "multipart/form-data",W3C rfc1341,
url http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html
MikeHart's UIKit plugin is a first release - in my opinion I don't think that it is ready for a full-on UIKit app. One of the outstanding problems is memory management - that the plugin does not allow hierarchies of views. A simple thing like adding a view to the application's root view is OK, but adding a view to that view becomes difficult.
(It is possible to add subviews to views by uncommenting the {"addView", addView}, line on line 254, but when the subview is removed from the view, if I remember correctly, the associated View class is not removed from memory. I have been experimenting with ways to get around this, by having the binding on the Lua side rather than the C side, as Lua has automatic garbage collection, but my skills are not good enough to go public with this. I would welcome a forum discussion on how to do this though.)
4. For that reason, you can't currently implement UINavigationController, as that requires a subview hierarchy.
3. Thank you for the fix - I've updated it on github.
2. I don't know what you mean by this.
1. The UIKit plugin only has UITextField implemented. Multi-line is done with UITextView. It shouldn't be too hard to implement UITextView, using UITextField as a pattern.
with the scrollview, adding other elements (which are views anyway) works perfect so your statement is not totally correct.
About the statusbar! What was changed in between that the bar was always hidden?
There was a debugging statement left in there - not sure how that happened. It was possibly me when I was messing around with stuff. Sorry.
Thank you for your answers.
I found the UIImageView is not implement, so I want to implement it, I add some code about UIImage in UIKit.mm, the following code
lua code beblow:
output error is :
I did wrong or what I do less?
Usually http post body data is string , such as a = 1 & b = 2 & c = 3, but sometimes we'll upload a binary file, such as sending a tweet with a picture, the http the post body t data necessary to use the multipart / form-data encoding mode, this is w3 specification, RFC-1341
Two things:
1. You're trying to access a Lua variable called "Image", which does not exist. All you have to do is add it in the loader() function:
About the "retain" issue. I remember thinking the same thing a while ago, because all the UIKit items do it. But I *think* I eventually went "Oh - that's why", but my memory is cloudy.
:-(
how to solve it? 8->
I think you have it now then?
You do need the "|R|filename.png" in main.lua to get the right path for the file.
it auto convent image path
in my app fold :
: ~/Library/Application Support/iPhone Simulator/4.3.2/Applications/3C1DF625-D9A4-4AE4-8E20-29ECB828B63B/Documents/TestUIImage/resource
-documents
md5.txt
-resource
--green-plus-sign-md.png
--main.lua
-temporary
attach image is my test app snapshot:)
Likes: Caroline