Adjusting length of UILabel dynamically - uilabel

Background:
I faced this issue while I was implementing Localization (programatically).
Question:
I'm new to iOS development & I need your help. In my company, I've given a task to implement Localization to one of the Apps that I'm working on. I implemented Localization successfully with help from this tutorial. In my app the previous programmer had NOT used IB & Auto-Layout to develop the UI. He has done it all programatically. Now the issue is, how do I address the changing Length of the UILabels, tittles of UIbuttons ?
Solutions that I've tried:
applying sizeToFit on UILabel
setting setAutoresizingMask:UIViewAutoresizingFlexibleWidth
Please guys, guide me to resolve this issue. Thanks in advance.
EDIT's:
Changed the title of the question to be more generic.

Related

iOS Swift - Dynamic Storyboard

I am currently developing a new iOS app which is basically a decision tree app. All the data comes from an XML file (list of questions and logic path depending on answers). The XML reading is not a problem.
I know I could develop this by hardcoding everything in the storyboard, but I don't find this efficient. Design-wise, I don't know where to start to sort of build the storyboard dynamically. What stops me is that, based on what the user answers, some paths have different number of levels (or questions); so different storyboard screens.
Any help would be much appreciated!
You may want to build your views "manually" from code.

UIPageControl with Images in Xcode 5/iOS7

I've been searching for an hour now and can't seem to find out how to use UIPageControl to act as a swipe between images (sort of like the weather application, but with images instead of pages).
I have 7 images and I want to use them to create an instruction manual for a game I'm developing.
I am new to developing so bear with me.
Can anyone provide links to tutorials that will show me this, or show me the code in the comments below?
Thanks.
In this tutorial, check the Paging with UIScrollView section
You can use UIPageViwController to do something similar. Here is the tutorial for it.

Creating views for iOS 6

I was wondering if someone could explain to me how to create views that work for both for iPhone 5 and prior models. I have done my research and have found people suggesting the use of
setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight
But I have the following questions regarding this.
If I am building in interface builder and plan on using the above line of code, do I leave the size option at "Retina 4 Full Screen"?
Will the above line of code account for images that were previously set at a specific location on 3.5 inch screens?
Is there a generic place I can put this line of code in my app so it does it for all views or do I need to put it in each viewController and within ViewDidLoad?
Thanks in advance!
If you are planning to deploy app only on iOS6, then you can use autolayout option.
If you are targeting iOS 6.0 and previous version then you can use view resizing with autoresizingMask. One other approach you can use is that it can be to design separate views for iPhone 5 and iPhone 4S. Check screensize and load views accordingly, as in the case of universal apps.
Thanks,
Jim.

master detail and single view application mixed

I am new here and new to iOS, so my apologies in advance if my question is silly.
I have just finished a course on iOS and Xcode and learnt how to build the different types of apps, like master-detail, tabbed or single view applications.
My question is : Is it possible to build an app that would be for example a master-detail app but would look like a tabbed one on one of the views and would look like a page-based on another view? In other words is it possible to create an app that would be a mix of several types ? I have Googled everywhere but I can't find anything. I may be using the wrong key words as on the top of that, I am French. I am not looking for precise explanations, just if somebody could point me in the right direction where to look and continue studying.
Thanks in advance and have a nice day.
Well am not sure if this is exactly what you are looking for but you can take a look at this example. Its a combination of UISplitViewController & UITabBarController
Custom UISplitViewController for iPad

Cocoa: Create iTunes/Things like Sidebar with Xcode 4.0

Does anyone know how I can create a iTunes/Things like Sidebar with Xcode 4.0 (Screenshot: http://i.stack.imgur.com/7uvCt.png)?
I'm pretty new to this and tried to play around with NSSplitView and NSTableView, but I've no idea how to get the "Title" (like "Erfassen" or "Fokussieren") and the Badges with the Numbers ("8" in Eingang, "4" in Heute) in it.
Thanks a lot!
Here is another good pre-made solution:
https://github.com/perspx/PXSourceList
Use NSOutlineVIew instead of NSTableView. I suggest using a tutorial for doing this. It's pretty complicated to newbies.
http://www.osxentwicklerforum.de/index.php?page=Thread&postID=117417&highlight=sidebar#post117417