Posts

Showing posts with the label iphone

How to disable isEnable and isUserInteraction attributes but keep cursor show in UITextField?

Image
Clash Royale CLAN TAG #URR8PPP How to disable isEnable and isUserInteraction attributes but keep cursor show in UITextField? I have a custom framework for UITextField . For now, I want to disable two attribute as the question above but still keep the cursor show in my custom textfield. I already disable the keyboard with set the inputView = UIView() , and that successful for hide the keyboard even show the cursor inside textField. UITextField inputView = UIView() My goal is disable both attributes like above or another for can not Select All action from my textField, but still keep the cursor available anytime. Select All Hope to hear the ideas from you guys. Thank a lot! Put a dummy view above textview with clear color, and show and hide that view. – Bista 31 secs ago By ...

How can I move the clear button in a UITextField?

Image
Clash Royale CLAN TAG #URR8PPP How can I move the clear button in a UITextField? For some reason, when I add a UITextfield as a subview of the contentview of a tablecell, the clearbutton does not align with the text typed in the field, and appears a bit underneath it. Is there any way I can move the text of the clearbutton to stop this from happening? Thanks for any help, 6 Answers 6 I haven't seen this, and a screen shot would be helpful. But, the quick answer is that you can inspect the subviews array of the UITextField, find the subview that contains the clear button, and adjust its frame.origin. Edit: It seems I've been downvoted for this answer (written in 2010). This is of not an "officially" approved method because you're manipulating private objects, but it's not detectable by Apple. The main risk is that the view hierarchy might be changed at some point. ...

How to set UiSearchBar Search icon on the right side in swift

Image
Clash Royale CLAN TAG #URR8PPP How to set UiSearchBar Search icon on the right side in swift I am working on Swift. As regular SearchBar By default its appearing like Following Pic(1). But as per our design requirement I need to change it as Following Pic(2). I tried using the following code I got like Following Pic(3) **When I tried the following code the right view is getting hide and I could not able to see the text field rightview Search icon completely invisible** let searchField = (searchBar.valueForKey("_searchField") as! UITextField) searchField.layer.cornerRadius = 15; let searchIcon = searchField.leftView! if (searchIcon is UIImageView) { print("yes") } searchField.rightView = searchIcon searchField.leftViewMode = .Never searchField.rightViewMode = .Always Can anyone help me to get the requirement. I can understand if you provide even on objective C as well 2 Answers ...

How to find Bundle ID of a bundle?

Image
Clash Royale CLAN TAG #URR8PPP How to find Bundle ID of a bundle? How to find the Bundle ID of a bundle but not of an app using iTunes Search API and having only link on the bundle? For example, https://itunes.apple.com/app-bundle/id1313169901. Note that request on https://itunes.apple.com/lookup?bundleId=1313169901 doest'n work also as just "id lookup" like for usual app: https://itunes.apple.com/lookup?id=1313169901 P.S. Haters, just GFYs. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

GMSMapView resize - strange flicker/blink effect

Image
Clash Royale CLAN TAG #URR8PPP GMSMapView resize - strange flicker/blink effect I have a subview including GMSMapView in my controller - initially it's collapsed and takes just a part of screen - then a user can expand it and see the map in fullscreen mode. The code below works however there is a strange flicker at the end of the animation Here is my code: let screenHeight = screenSize.height let proportionalHeight = (screenSize.width * 46.0 ) / 75.0 mapViewHeight.constant = !isMapFullscreen ? screenHeight : proportionalHeight UIView.animate(withDuration: 1.0, delay: 0, usingSpringWithDamping: 0.9, initialSpringVelocity: 0, options: UIViewAnimationOptions.curveEaseInOut, animations: { self.view.layoutIfNeeded() }, completion: { finished in if finished { self.isMapFullscreen = !self.isMapFullscreen } }) vid...

lldb cannot lookup symbol in imported dylib

Image
Clash Royale CLAN TAG #URR8PPP lldb cannot lookup symbol in imported dylib I am debugging a C program on arm64 with lldb and in order to implement my own debugging function I wrote a standalone debug helper program, compiled it as a dylib and imported it into lldb by using: (lldb) target modules add debugHelper.dylib (lldb) target modules add debugHelper.dylib However when I call the function declared in the dylib, lldb errors: (lldb) expression debugPrint() error: Couldn't lookup symbols: _debugPrint If I type in a random function name (e.g. foo): (lldb) expression foo() error: use of undeclared identifier 'foo' , which makes me believe importing the dylib is indeed successful, since debugPrint is not an undeclared identifier . debugPrint undeclared identifier // debugHelper.c #include <stdio.h> int debugPrint() { printf("%sn", "Debug info printed! n"); return 0; } debugHelper.dylib is compiled with: $ xcrun --sdk iphoneos cc debugHelpe...

How to write text on image in Objective-C (iOS)?

Image
Clash Royale CLAN TAG #URR8PPP How to write text on image in Objective-C (iOS)? I want to make an image like this programmatically: I have the upper image and text with me. Should I write text on the image? I want to make it a complete .png image(image + label) and set it as the background of the button. Have you tried UIImage and UILabel? – Praveen S Aug 9 '11 at 7:34 no.. Please provide the sample code so that I can try. – Sanchit Paurush Aug 9 '11 at 7:35 Do you just want to display it like that inside your app, or do you want to edit image file to contain this text and save it like that? – Filip Radelic Aug 9 '11 at ...

How to resolve white screen on ionic application (ios)

Image
Clash Royale CLAN TAG #URR8PPP How to resolve white screen on ionic application (ios) My app shows a white screen on the device but it correctly runs in the browser and emulator. I have tried a lot of solutions, but none have worked for me. I also use the ionic run ios -l -c command to see errors on the console log but it didn't show any errors. ionic run ios -l -c Does anyone have any suggestions on how I could debug this issue? what is your xcode , OS,and ios version ? – sam Jul 18 '17 at 11:27 xcode 8.3.3 , os sierra and ios version 9.3 – suniel kalwani Jul 18 '17 at 11:44 2 Answers 2 I also f...

Xcode “Device Locked” When iPhone is unlocked

Image
Clash Royale CLAN TAG #URR8PPP Xcode “Device Locked” When iPhone is unlocked When I tried to build and run, Xcode said my device was locked. I looked at my iPhone, and it's not locked at all....possible bug? How do I fix this? lock it and unlock it again – ChrisH Nov 6 '14 at 23:50 tried it, still no luck – Faisal Syed Nov 6 '14 at 23:59 For me, unplugging and re-plugging did the trick. No need to Clean Build Folder, restart Mac with Command+Option+P+R, leave the house and come back again, burn a Voodoo doll of Steve Jobs, etc. – Nicolas Miari Sep 16 '16 at 3:22 ...