Adjusting the content to fit on every Iphone [closed] - xcode

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
i can't manage to adjust all my content on the iphone 6s aswell as on the iphone 4.. on the iphone 6s the label font size is very small compared to the screen size, and on the iphone 4 not all of the content fits on the screen.
I tried solving this problem using auto layout, but there is no difference between the iphone sizes. only between ipad and iphone landscape and portrait..
i dont want to adjust this with code, is there a way to do it in the storyboard?

You can't use Size Classes to distinguish iPhone 4 vs iPhone 5.5. Size Classes can only distinguish these cases (see picture below). You must check the specific screen size in you code

Are you familiar with auto layout and constraints? You do not have to open every simulator to see how does it look on different devices. And you can do it in storyboard.
You can open Storyboard -> click on the assistant editor -> Now where it says "Manual"
enter image description here on the upper thing click on "Preview"
And now you can mess around more easily with constraints and see right after change how it looks like on different screen sizes.

Related

Custom Xcode Simulator Device / Size (e.g. 20x5)

Ideally I would want to define my own Device for in the Simulator. Let's say 2000w x 500h.
Anybody know of any way to accomplish this?
You might be wondering, "why does he want to do that?" It's for prototyping, a non standard sized screen.
Some directions, but not sure if they can work:
unlocking the aspect ratio of window resizing
creating an own device
changing the sizes of one of the existing devices

Swift 4 How to force Xcode to render vector images?

I am writing the app using latest Swift 4.1.2 and Xcode 9.4.1 for iOS 11.4. So I want to use vector images in my app in PDF format. I made the simple app which showing the problem, please, look:
This app only show only one image, but if you rotate the screen, rendering happens and picture becomes beautiful.
So the question is: how to force Xcode render vector images in Main.storyboard without touching the code? So app upload already rendered images?
Go to -> Images.xcassets and select the image. From the attributes inspector, make sure that preserve vector data is checked as following:
I hope it solves your problem.
Xcode 9 changes situation for vector data by allowing you to choose to treat the image as a vector at runtime. This means the image can smoothly scale to arbitrary sizes. The only change you need to make is to tick Preserve Vector Data for the PDF image in the asset catalog.

Emojis in Segmented Control [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I have emojis used in the different segments for my Segmented Control. When I select a segment, the selected segment highlights (indicates which one was selected), and the emoji suddenly becomes all white. Is there anyway to fix this issue? Thanks!
I use follow code and it worked for me.
OC:
[segmentedControl setTitleTextAttributes:#{NSForegroundColorAttributeName:[UIColor whiteColor]} forState:UIControlStateSelected];
Swift:
let segmentedControl = UISegmentedControl(items: ["😊","😢","moon"])
segmentedControl.setTitleTextAttributes([NSForegroundColorAttributeName:UIColor.whiteColor()], forState:.Selected)
I believe this is because the coding for emoji is not compatible with UIViews.
What you can do is select Momentary for the State. It will still disappear on click but will quickly come back.
Unfortunately the segment won't stay hilighted blue like you probably want though.

Fullpage.js: Page is scrolling too fast [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I have a fullpage.js site at the following link that is made up of 2 sections: 1 with a few slides, and a second section which is very long, and which takes some scrolling to navigate.
http://www.heartpatrick.com/indexnew.html
I noticed that the second section scrolls considerably faster now after i have implemented fullpage.js compared to what it used to behave previously. This happens both on a laptop using the mouse wheel, and on my iphone. I also don't get the smooth momentum scrolling effect on my iphone anymore, different from last time.
Can you tell what did I do wrong with my codes?
Thanks all! :)
I also don't get the smooth momentum scrolling effect on my iphone anymore, different from last time.
That's an already known issue when using scrollOverflow: true as you can see in this topic.
Regarding the speed. I see it normal. If you see it in the same way in this demo, then there's nothing wrong.
Try adjusting scrollingSpeed to your liking.
Look up the Initialization section in the docs.

How to resize font on all slides at once in Powerpoint 2010? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have created a bunch of slides in Powerpoint 2010, and all attempts to resize the text on ALL of them at once, have failed.
I have tried using the "master" slide and it does allow me to change the color and position of the text element on all slides, but despite the master slide showing the intended font size, the real slides do not.
How can I resize the text on ALL 55 of my slides at once in Powerpoint 2010?
Simple solution that I just figured out. Once you've changed the master, go to each slide and click "reset" on the home bar to force those changes. One click per slide and you're done.
You can also select all the slides and then click on Reset. Works like a charm :)
You are able to do this with a master slide. I believe you may be using them incorrectly. You create a master slide, then fill in the empty text boxes that are created in the slideshow.
At this point, you may be able to resize all of the text by going into outline view, selecting all of the text, and resizing. You should be able to select individual lines of text as well, and adding to the selection by holding CTRL, and selecting more lines. Then you can, for example, resize body text, and header text.
UPDATE
I tried this and it works.
Changing the master only affects text in placeholders and then only if the user hasn't selected and formatted the text differently from what the master dictates.
Random text on slides has no connection to the master, so changing the text size on the master won't help.
A macro to change all the other text sizes wouldn't be too hard to write if you just want to make all the text xx points, but it takes quite a lot more work to do a proper job of it (adjusting the text spacing and such rather than just the text size).

Resources