iOS Extension: UITextfield

This is a subclass of iOSTextfield giving access to some more properties. You will also find a iOSImageExtension module enabling you to resize an iOSImage (which is by default immutable). Documentation and cleaner code will follow soon.


BTW couldn’t find how to make the textfield transparent.

Is there a version that work on 64bit? The one above does not show anything in the textfield (on a real device).

Thanks Ulrich, this is a great subclass. However I found the UITextfield is not 64 bit compatible. The iOS ImageExtension module seems to be fine… in my humble opinion and testing… Is there any way to fix this? Thanks a million…

Sorry for the late answer, Nic – I had not noticed your post.
I am refining all I did (and put in more) in a complete library, but textfield has not been redone yet.
You can anyway use a lot of its features though: You have access to the underlying UIView object of every Xojo control either by addressing the iosLibView property (and its CALayer if you like) or can use the iOSControl extension that has some frequently used convenience methods like backgroundcolor or alpha.
If you tell me what features of the textfield you miss most, I’ll try to implement them as one of the next things.
The documentation in the GitHub wiki is far behind the things already implemented but I try to test them a time before I add them to the docs:

Thanks Ulrich, I would like to have a picture at the beginning of the text field and it looked really cool but had to remove it… I would appreciate it very much… :slight_smile:

I am currently working on completing the layer stuff and a small add-on release for XDC. After that I will take care of returning all those snippets like borders and textfield into the lib and build Xojo wrappers around them. Promised!

Almost done, I think I will have this online until Monday at the worst:
an iOSButton extension giving you access to many more features than before:

(no custom paint, all declares. Lousy edges due to non-retina Simulator device on a Retina screen)

and the missing feature in iOSFont: a list of the available fonts and a method to retrieve their names:

I’ll add the UITextfield additions too and then inform you when it’s online.

It’s online now. I replaced the old iOSLib with the new version. Please look at the important notice – it will break previous iOSLib code.
And I hope all the needed files are included. As nice as sourcecode management software is, I find it not always the easiest to use.

You should not try to use the switches on the Textfield demo view too often. Once an imageview has been added to rightview or leftview, it is better to replace its image property instead of releasing and adding a new one.

I didn’t have time to write the documentation. Please have a look into “iOSLib/Class Extensions” where you find an iOSButtonExtension and an iOSTextFieldExtension. Both are giving you “properties” for direct use with Xojo classes and data types and an AppleButton/AppleTextField property giving you access to the underlying iOS features directly.

The link: iOSLib Unified

P.S.: If you need a custom TextField subclass with all the events a UITextfield delegate delivers, let me know.

EDIT: I just noticed EmitterView is currently not working and the SpaceShooter Demo doesn’t react on Taps. Will fix that soon.

Some folders could not be found:

Both should be in the AppleSharedCore/CoreGraphics and AppleSharedCore/CoreImage/CIFilter folders but they are not in the GIT

Thanks, Christoph. Yes, somehow the folders were left empty. Should be fixed now.

P.S.: I took the opportunity to add some more Motion events to the views. I still have no device to test, would be great to have some feedback if they are working.

Another folder could not be found

Should be in iOSLib folder.

Could be an old reference not updated. It is in the AppleSharedCore Folder. I am sorry – I was afraid something like this would happen after former experiences with moving sourcecode managed projects.
EDIT: If it’s the interfaces folder in iOSLib and the shared one is there, just delete the first reference. It was empty …

When uploading my API, they returned:

Non-public API usage:

The app references non-public selectors in ElectriCon: pointValue, rectValue, setBlue:, setGreen:, setRed:, setW:, setX:, setY:, setZ:, sizeValue, timeStamp, valueWithPoint:, valueWithRect:, valueWithSize:
If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.

Will change the method names and take it from there…

They complain about method names? Which are part of the official CIVector API (and CIColor)? Sounds strange.

Renamed them and then all was fine… Thanks for your efforts Ulrich!

Glad to hear that, Nic! Stil a bit strange though. Did they give you a hint on the name of the private API that was mirrored by the method names? I am currently doing a bit of clean-up to get rid of the compiler warnings, surely would like to debug this issue too. Or was it a custom method you created that used these names?

P.S.: Hey, and it’s great to hear the Lib in general is accepted by Apple! Thanks!

It was not a custom method that I created…

Hi Ulrich,

little problem…

ImageView1 and Button1 of SplashView work well in the simulator, but do not work on iPhone, iPadMini? The other animations, Label1 and Button2 are fine… Actually want to use something like ImageView1…