All Questions
17,985
questions
513
votes
8
answers
156k
views
iPad Multitasking support requires these orientations
I'm trying to submit my universal iOS 9 apps to Apple (built with Xcode 7 GM) but I receive this error message for the bundle in iTunes Connect, just when I select Submit for Review:
Invalid Bundle. ...
375
votes
10
answers
315k
views
Remove or uninstall library previously added : cocoapods
I added an external framework via cocoapods into my iOS application. How can i remove that library from the project?
344
votes
17
answers
276k
views
iPhone App Icons - Exact Radius?
I'm trying to create the icon for my iPhone app, but don't know how to get the exact radius that the iPhone's icons use. I've searched and searched for a tutorial or a template but can't find one.
I'...
324
votes
18
answers
203k
views
Detect current device with UI_USER_INTERFACE_IDIOM() in Swift
What is the equivalent of UI_USER_INTERFACE_IDIOM() in Swift to detect between iPhone and iPad?
I get an Use of unresolved identifier error when compiling in Swift.
293
votes
24
answers
255k
views
Proper way to exit iPhone application?
I am programming an iPhone app, and I need to force it to exit due to certain user actions. After cleaning up memory the app allocated, what's the appropriate method to call to terminate the ...
272
votes
23
answers
285k
views
How to get device make and model on iOS?
I was wondering if it's possible to determine what kind of iPhone (for example) the currentdevice is? I know it's possible to get the model through
NSString *deviceType = [[UIDevice currentDevice] ...
264
votes
3
answers
138k
views
CSS submit button weird rendering on iPad/iPhone
I noticed that if I style my buttons with CSS using radius, colors and borders, they look good but in the iphone/ipad/ipod they look terrible...shouldn't be the same rendering as in Safari Desktop??
237
votes
6
answers
250k
views
Styling input buttons for iPad and iPhone
I'm using CSS to style the input buttons on my website, but on IOS devices the styling is replaced by Mac's default buttons. Is there a way to style buttons for iOS, or a way to maybe make a hyperlink ...
220
votes
21
answers
82k
views
Converting Storyboard from iPhone to iPad
I have an iPhone application which has a storyboard. Now I want to provide an iPad application too. So I asked me whether there is a function which helps me convert my iPhone storyboard to an iPad ...
214
votes
2
answers
108k
views
How to fix UITableView separator on iOS 7? [duplicate]
UITableView draws with ragged lines on iOS 7:
How to fix it? The line between cells should be on the full width of the screen.
214
votes
12
answers
318k
views
Setting an image for a UIButton in code
How do you set the image for a UIButton in code?
I have this:
UIButton *btnTwo = [UIButton buttonWithType:UIButtonTypeRoundedRect];
btnTwo.frame = CGRectMake(40, 140, 240, 30);
[btnTwo setTitle:@"...
207
votes
55
answers
66k
views
Xcode 4 hangs at "Attaching to (app name)"
I just upgraded to Xcode 4 and for some reason my app won't run in the simulator or iOS device. It was working perfectly in Xcode 3, but all of a sudden now when I press run the program stops at "...
203
votes
16
answers
95k
views
How can I click a button behind a transparent UIView?
Let's say we have a view controller with one sub view. the subview takes up the center of the screen with 100 px margins on all sides. We then add a bunch of little stuff to click on inside that ...
201
votes
24
answers
225k
views
How do I URL encode a string
I have a URL string (NSString) with spaces and & characters. How do I url encode the entire string (including the & ampersand character and spaces)?
195
votes
11
answers
188k
views
Xcode/Simulator: How to run older iOS version?
I'm thinking of upgrading to iOS SDK 4.2. But what I'm wondering is if I'll still be able to run the simulator as iOS 3.2. This is because I'm creating iAds for iPad but I still want to check if my ...
175
votes
32
answers
505k
views
HTML5 Video tag not working in Safari , iPhone and iPad
I am trying to create an html5 web page in which there is a small video like 13s , I converted the flash version of this video into 3 format : .ogv using fireFogg , .webm using firefogg also and .mp4 ...
168
votes
18
answers
135k
views
iPad Web App: Detect Virtual Keyboard Using JavaScript in Safari?
I'm writing a web app for the iPad (not a regular App Store app - it's written using HTML, CSS and JavaScript). Since the keyboard fills up a huge part of the screen, it would make sense to change the ...
167
votes
9
answers
70k
views
Obscure a UITextField password
I am doing a login page. I have UITextField for password.
Obviously, I do not want the password to be seen; instead, I want circles to show when typing.
How do you set the field for this to happen?
163
votes
27
answers
614k
views
Install .ipa to iPad with or without iTunes
I have the .ipa from PhoneGap build and I need to test it. I got provisioning profile from Developer account.
So my question is: can I directly put my .ipa to iPad to install for testing, or do I ...
157
votes
12
answers
174k
views
UIButton Image + Text IOS
I need a UIButton with image & text. Image should be in the top & text comes under the image both should be clickable.
156
votes
19
answers
96k
views
How to detect total available/free disk space on the iPhone/iPad device?
I'm looking for a better way to detect available/free disk space on the iPhone/iPad device programmatically.
Currently I'm using the NSFileManager to detect the disk space. Following is the snippet of ...
148
votes
15
answers
185k
views
How to center a subview of UIView
I have a UIView inside a UIViewm and I want the inner UIView to be always centered inside the outer one, without it having to resize the width and height.
I've set the struts and springs so that it's ...
147
votes
36
answers
144k
views
Xcode doesn't see my iOS device but iTunes does
I have a strange problem.
I have an iPad with iOS 5.0.1 (9A405) and iOS SDK 5.0.1 with Xcode 4.2 (Build 4C199) installed on my Mac.
Xcode doesn't see my device. It says "iOS Device" not "Sauron's ...
147
votes
11
answers
154k
views
What size should apple-touch-icon.png be for iPad and iPhone?
Are Apple touch icons bigger than 60x60 supported, and if so, what dimensions should I use for the iPad and iPhone?
147
votes
6
answers
70k
views
How to programmatically display version/build number of target in iOS app?
How can I programmatically get the value of the target version, like in the image below?
As seen in the Properties window of the target of my Xcode project. I want to display this in the splash ...
145
votes
15
answers
366k
views
position: fixed doesn't work on iPad and iPhone
I have been struggling with fixed positioning in iPad for a while. I know iScroll and it does not always seem to work (even in their demo). I also know that Sencha has a fix for that, but I couldn't ...
142
votes
6
answers
83k
views
Animate change of view controllers without using navigation controller stack, subviews or modal controllers?
NavigationControllers have ViewController stacks to manage, and limited animation transitions.
Adding a view controller as a sub-view to an existing view controller requires passing events to the sub-...
140
votes
2
answers
93k
views
How do I access the host machine itself from the iPhone simulator
I'm developing an app that connects to a web service for most of it's operations. As a shortcut, I'd like to run a copy of my development server on my machine. Question is:
How/can I access the host ...
138
votes
9
answers
156k
views
How to draw a custom UIView that is just a circle - iPhone app
How would I go about drawing a custom UIView that is literally just a ball (a 2D circle)? Would I just override the drawRect method? And can someone show me the code for drawing a blue circle?
Also, ...
137
votes
5
answers
93k
views
How can I save an image to the camera roll?
I am new to Xcode (using 4.3) and am not sure how to save an image to the device's camera roll. All that I have done so far is set up an IBAction for the button to save the image. What library method ...
136
votes
27
answers
148k
views
UIScrollView not scrolling
I have a UIScrollView which contains many UIImageViews, UILabels, etc... the labels are much longer that the UIScrollView, but when I run the app, I cannot click and scroll down...
Why might this be?
...
134
votes
17
answers
168k
views
UILabel is not auto-shrinking text to fit label size
I have this strange issue, and im dealing with it for more than 8 hours now.. Depending on situation i have to calculate UILabels size dynamically,
e.g my UIViewController receives an event and i ...
120
votes
7
answers
34k
views
How to detect that animation has ended on UITableView beginUpdates/endUpdates?
I am inserting/deleting table cell using insertRowsAtIndexPaths/deleteRowsAtIndexPaths wrapped in beginUpdates/endUpdates. I am also using beginUpdates/endUpdates when adjusting rowHeight. All these ...
117
votes
31
answers
80k
views
Not able to type in textfield in iphone simulator using Mac Keyboard?
I'm working on a basic iOS app which supports both portrait and landscape modes. When the iPhone simulator keyboard is open in landscape and I'm switching the app to portrait mode I'm unable to type ...
117
votes
9
answers
144k
views
How to set the UITableView Section title programmatically (iPhone/iPad)?
I've created a UITableView in Interface Builder using storyboards. The UITableView is setup with static cells and a number of different sections.
The issue I'm having is that I'm trying to setup my ...
116
votes
6
answers
263k
views
javascript scroll event for iPhone/iPad?
I can't seem to capture the scroll event on an iPad.
None of these work, what I am doing wrong?
window.onscroll=myFunction;
document.onscroll=myFunction;
window.attachEvent("scroll",myFunction,...
115
votes
5
answers
81k
views
iOS: Access app-info.plist variables in code
I am working on a Universal app & would like to access the values stored in app-info.plist file in my code.
Reason: I instantiate a UIViewController dynamically from a storyboard using:
...
115
votes
29
answers
85k
views
Is it possible to use AutoLayout with UITableView's tableHeaderView? [duplicate]
Since I discovered AutoLayout I use it everywhere, now I'm trying to use it with a tableHeaderView.
I made a subclass of UIView added everything (labels etc...) I wanted with their constraints, then ...
114
votes
9
answers
74k
views
Navigation bar appear over the views with new iOS7 SDK
CGRect cgRect1 = [[UIScreen mainScreen] applicationFrame];
UISearchBar *mySearchBar = [[UISearchBar alloc]
initWithFrame:CGRectMake(0, 0, cgRect.size.width, 40)];
mySearchBar....
113
votes
6
answers
24k
views
To ARC or not to ARC? What are the pros and cons? [closed]
I've yet to use ARC, since the majority of the code in the project I'm working on at the moment was written pre-iOS 5.0.
I was just wondering, does the convenience of not retaining/releasing ...
110
votes
7
answers
84k
views
Is there a UIView resize event?
I have a view that has rows and columns of imageviews in it.
If this view is resized, I need to rearrange the imageviews positions.
This view is a subview of another view that gets resized.
Is ...
108
votes
3
answers
15k
views
Override setter with arc
@interface Article : NSObject
@property (nonatomic, strong) NSString *imageURLString;
@end
@implementation Class
@synthesize imageURLString = _imageURLString;
- (void)setImageURLString:(NSString ...
107
votes
3
answers
67k
views
How to build a framework or library for other developers, the secure way? [closed]
We have an idea for an framework or library that will be very helpful for any iOS developer. So we're seriously thinking about switching from app development to framework/library development.
But when ...
104
votes
10
answers
43k
views
iOS Development: How can I induce low memory warnings on device?
I'd like to test my app functions well in low memory conditions, but it's difficult to test. How can I induce low memory warnings that trigger the didReceiveMemoryWarning method in my views when the ...
104
votes
9
answers
94k
views
iphone/ipad: How exactly use NSAttributedString?
Yes, many people are saying about Rich Text in iPhone/iPad and many knows about NSAttributedString.
But how to use NSAttributedString? I searched for much time, no extract clues for this.
I know ...
103
votes
4
answers
28k
views
Xcode 4.5 Storyboard 'Exit'
I have just installed Xcode 4.5 for iOS6 support, and I have seen a new icon called 'Exit' in my Storyboard, listed under my view controllers along with 'First Responder' etc. A little green icon ...
101
votes
7
answers
52k
views
How to write a BOOL predicate in Core Data?
I have an attribute of type BOOL and I want to perform a search for all managed objects where this attribute is YES.
For string attributes it is straightforward. I create a predicate like this:
...
101
votes
10
answers
181k
views
What are the sizes used for the iOS application splash screen?
I am developing an application using the iOS SDK. I need to know what Default splash screen sizes I need.
101
votes
11
answers
119k
views
How do I reset the scale/zoom of a web app on an orientation change on the iPhone?
When I start my app in portrait mode, it works fine. Then I rotate into landscape and it's scaled up. To get it to scale correctly for the landscape mode I have to double tap on something twice, ...
98
votes
16
answers
90k
views
Is it possible to force ignore the :hover pseudoclass for iPhone/iPad users?
I have some css menus on my site that expand with :hover (without js)
This works in a semi-broken way on iDevices, for example a tap will activate the :hover rule and expand the menu, but then ...