TomSwift / TSAlertView ios 5 ARC version - ios5

Will the apple allow us to use our own customized alertView ?
I find this TSAlertView is not compatible with ios 5(ARC) . I just remove all the 'auto release ' 'retain' from the .m file. now it does't work. when show it. it always print 'TSAlertViewController dealloc' . Do you know why ?
I just want a Alert View that I can change the background image , button image or someting...

You don't need to convert TSAlertView to use it in ARC-enabled project. You can disable ARC only for TSAlertView. There is the instruction: How can I disable ARC for a single file in a project?
I've just successfully used TSAlertView in my ARC-enabled project.

You can use your own custom view instead of an alert view, yes.
ARC is about more than just removing retains and release. But, there is a convertor to help you and it is available in Xcode's Refector Menu.
See the answer to 1.

Related

Xcode Storyboard not updating custom class Designables

I have had many problems after closing Xcode which one of them is that Xcode Storyboard is not updating Custom Class Designables anymore and do not show the content. For example I use "SkyFloatingLabelTextField" which worked perfeclty before so I can't blame the library. Is there some way so I can force it to update it?
What I mean illustration:
As you can see, in the first picture I have assigned the custom class and there is actually textField inside my viewController which for some reason doesn't show up anymore in Storyboard but works on real device or simulator.
So can I force it somehow?
I tried removing the class and all runtime values, clean, build close Xcode but nothing is working.
Huhh... Enabling "Automatically refresh views" did the trick. For some reason it was turned off in my case. If you do not know what I mean, then it is the setting in Editor -> Automatically refresh views

Xcode 7 - Launch Screen localization doesn't work

I've created a splash screen in Swift using Xcode 7. I've generated localizations as in the photo for different languages, but it doesn't work:
Can anybody help?
Ok I fix it after i create InfoPlist.strings and create splash screen for each language and add below in each file
"UILaunchStoryboardName" = "LaunchScreen";
"UILaunchStoryboardName" = "LaunchScreenSP";
Add two Launch Screen storyboards
You can find your info.plist added a key named "UILaunchStoryboardName"
Add an infoPlist.string file
Change the UILaunchStoryboardName = "ENLaunchScreen"; in your infoPlist.string to the name of storyboard you wanted
Another solution, you can set some basic image at the launch screen, then create a view in app delegate and add in to window's subviews, also bring to front pretend that this is Launch screen.
now you can configure this view by code.
last use DispatchQueue asyncAfter to remove this view.

Integrate auriotouch in another app

excuse me to create again this question, but I have another problem. I'm trying to integrate the aurioTouch Apple sample in my app. I have put all the code that was in aurioTouchAppDelegate in my app delegate file. The code runs, but some methods, like methods in EAGView file doesn't run, I don't know whym they are not called.
Some help or hints are welcome...
Have you integrate all the setting from Project's Build Settings. Actually I had the same issue but then I compare all the settings from Build Settings and found that some of the Linker flags were creating the problem and then was able to solve the problem. So whenever you have such problems try to go to Project's Build setting and compare all the keys. Mostly the Linker flags creates the problem in such cases.... hope this help to others also...
EDIT
After referring to your project. Notice that you have overloaded the property view of ViewController with your custom View EAGLView. You have not separated customView and ViewController's view.
Also, one major thing is you have to Initialize your EAGLView and add it to your ViewController's view. and rest of the things will go on in EAGLView.

Phonegap - How do i make the statusbar black?

Pretty simple one that I just seemingly can't find the answer to.
How can i change the iPhone statusbar (thin bar right at the top with the reception/batter etc) from default grey to black in my PhoneGap iPhone application?
Thanks,
Glen
A PhoneGap-iPhone application is just a regular Xcode iPhone project.
Add UIStatusBarStyle:UIStatusBarStyleBlackOpaque to your Info.plist.
Open your Xcode project (e.g. MyApp.xcodeproj)
Open your Info.plist file (e.g. MyApp-Info.plist)
Add a new row:
Key: Status bar style
Value: Opaque black style
If you are viewing the RAW Key/Value pairs, then use:
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
You can right-click in MyApp-Info.plist to toggle the RAW Key/Value pairs.
just set
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackOpaque;
When a PhoneGap Project is created, there is an <ApplicationName>AppDelegate.m file created in the project.
Inside of the (void)viewDidLoad method, you can make modifications to the view however you choose.

Images in Interface Builder when using MonoTouch

I'm new to MonoTouch and iPhone development. I have my images (PNG) in a resources folder in MonoDevelop, however if I want to set the image property for a button in Interface Builder, how do I do that? It's always a blank dropdown. Do I need to use XCode to access the XIB file and then somehow embed the button image file I'll need in it?
This is a known limitation of MonoDevelop and Interface Builder. To add images to an XIB in Interface Builder they must be part of an XCode project, which of course coming from MonoDevelop they're not.
To achieve what you're trying to do you will need to set the image via code, and ensure the build action of your image is set to Content. To do this, simply right click your image inside MonoDevelop, and select Build Action > Content.
On your view with the button on it, create an outlet in Interface Builder for your button, hook it up, then from code to set your image, you just need to use the .FromFile("path/name") method of UIImage.
UIImage buttonImage = UIImage.FromFile ("resources/image.png");
myButton.SetBackgroundImage (buttonImage,UIControlState.Normal);
That's off the top of my head, but I think that should do it.
You can manually set the image in Interface Builder, but it wont show up until run time. The image name can include a path, e.g. "images/settings.png".
All solutions given here are completely wrong and misleading. All you need to do, is place your images in the Resources folder (on the project root), and add your images to this folder. After adding files to this folder, mark all files and make sure their build action is set to BundleResource.
I also needed this to work, here is a workaround I found.
You need to create a dummy xcode project. Place it in the same folder as your project.
Add all your xib files and image files to that xcode project by dragging them in when the project is opened in xcode. Now you will be able to see the preview of the images.
The image files must be in the same folder as the project file and xcode must be opened with the dummy project while the interface builder is opened.
Not great - but solves the issue for now.
Here is a sample project I have created.
For this issue to be resolved on the MonoDevelop side - some inter-process communication code needs to be created, I think that a good starting point will be looking for "PBXProjectWatcherServerConnection-3.1.2" in google.