When changing the assets in the Parse Anypic tutorial it doesn't show up in the actual simulator. The files I changed are in the Resources folder: Default.png, Default#2x.png, Default-568h#2x.png, Default-667h#2x.png, Default-736h#2x.png
For more clarification this is a picture of the files I changed.
https://www.dropbox.com/s/cjml6hs2aur9z96/Screenshot%202015-04-21%2017.09.13.png?dl=0
Question: How can I change the black "Home" screen - not the LaunchImage but the actual interaction. I want to re-skin the app.
For clarity, I'm referring to the first screen you see after logging into Facebook. This screen has three tabs at the bottom, "Home", "Camera", and "Activity". The "Home" view is controlled by PAPHomeViewController.m, and the "Activity" view is controlled by PAPActivityFeedViewController.m.
In both of these controller classes, the main background is covered by a table view and there is also a blankTimelineView that can be shown as the table view header.
To update the background, you can have a couple of options. Option 1 is to change the view behind the table view and make the table view transparent. Option 2 is to change the background on the table view itself.
In both cases, you may also want to make the blankTimelineView background transparent so the background always shows through.
If you go with Option 1, the following code can be placed at the bottom of the viewDidLoad method in PAPHomeViewController.m and in PAPActivityFeedViewController.m
// For simple change, set background color
// To show an image, add an UIImageView as a subview
self.view.backgroundColor = [UIColor redColor];
// Make sure background shows through
self.blankTimelineView.backgroundColor = [UIColor clearColor];
self.tableView.backgroundView.backgroundColor = [UIColor clearColor];
If you go with Option 2, you can use the following code at the bottom of the viewDidLoad method in PAPHomeViewController.m and in PAPActivityFeedViewController.m
// For simple change, set background color
// To show an image, set backgroundView to a UIImageView
self.tableView.backgroundView.backgroundColor = [UIColor redColor];
// Make sure background shows through
self.blankTimelineView.backgroundColor = [UIColor clearColor];
If you aren't getting the assets changed maybe run it on an actual phone. Check to see if the assets show up or not based on your result choose between starting over and importing all your code or retrieve the assets from another project and import it to your old project
Related
I want to change the custom keyboard template background colour.The default colour is grey. am trying to supply an image for its background but it is still showing grey.Below is the code I tried
self.view.opaque = YES;
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:#"bg"]];
But the same background colour changes when I did like below code
self.view.opaque = YES;
self.view.backgroundColor = [UIColor blackColor];
And similarly the same issue when I pass UIImages to UIButton's current image inside the keyboard template.Where am I going wrong?
I will answer my own question.Found the answer here.Thanks to honcheng.
You probably didn't add the image to your keyboard target.
Check your keyboard target > Build Phases > Copy bundle resources to make sure that the image is there. Drag it there if it isn't.Note that I am talking about the keyboard target, not the host app. That could be the confusion here.
im trying to make a menu like FIFA app but i can't put the tableview in a transparent color,so the background image can be visible, can anyone help me?? I've tried of everything, any of this answers worked for me: UITableView clear background so i really need your help.
In addition to setting the background color of the table view to clear, you have to set the background color of the table view cells. And that, at least in my experience, has been somewhat tricky and couldn't be easily done via Interface Builder (the storyboard or the xib).
So you have to set the background color on your cells directly. For example, during your tableView:willDisplayCell:forRowAtIndexPath: delegate method, you'd do something like:
cell.backgroundColor = [UIColor clearColor];
And as rmaddy points out, Apple documentation for that method states:
This method gives the delegate a chance to override state-based
properties set earlier by the table view, such as selection and
background color.
I have a working IPad App. I built everything on a default white screen and I want to add an image to background of the image. I read a couple of articles and most of the suggest to create a new UIImage with the background image and stretch it to the full screen. I tried that but I am using a couple UIImage to display the photos taken and my UIImage s seem to stay at the back of the background and they don't get shown.
What is the proper way to set the background of IPad App?
this is the screenshot of my IPad App
Follow these steps :
1) Add UIImageView to your UIView.
2) Fill it with your Background UIImage.
3) Select your Background UIImageView and Select "Send to Back" Option....
The key is your view hierarchy. If you do not want to hassle around with moving the subviews along and sendings ome to back and some to front, then start with a proper view hierarchy from the beginning.
Basic rules are: the subviews overlay their superviews.
If siblings overlay each other, then the last one added is shown.
Your view hierarchy could be:
\UIView (A: the underlying self.view from the view controller's point of view.)
\UIImageView (B: the view for your background image. Empty or hidden from start.)
\UIView (C: Container for all of your views, no background color, no background image)
\UIImageView (C1: One of your picuters)
\UIImageView (C2: One of your picuters)
\UIImageView (C3: One of your picuters)
\UILabel (C4: One of your labels)
\ ...
Build up your view hierarchy. And when you need to add or change the background then assign the appropriate UIImage ot the View B.
Certainly, there is more than one way to achieve this. However, I personally thinkthat some proper view hierarchy works best, regardless whether you do that in IB or programmatically.
The proper way is to create a UIImageView and set it to the size of your view, and put all the others View in fron of it. The tutorials that you read are giving you the right way.
If you do not want to add an image, only a color you can set the background color of your view to this color.
You can use this code to send the ImageView to the back:
[self.view sendSubviewToBack:YouBackgroundImageView];
EDIT
Because you posted and XIB screenshot:
Your background image view must be in the first position, like this image:
My app needs to save an image to disk. I do this in a separate thread, so the UI is still responsive, BUT, I do not want the user to add a new image until the first one is saved (about 1 second.)
At the moment, I'm disabling the 'take another picture' button and greying it out, but I'm wondering if there is a method that will disable the whole view, greying out the buttons and darkening the background, like what happens when a UIActionSheet is presented.
I've looked through the UIView docs and don't see anything like this, but it seems like such a useful pattern that is frequently used by Apple that I figured I'd ask, just in case there was such a thing.
Obviously I could do it manually, but why reinvent the wheel if its already part of the API.
TIA: John
set whatever view (main view, subview, etc.) you want to appear disabled to
view.userInteractionEnabled = NO
and also
view.alpha = 0.3f
and maybe even
view.backgroundColor = [UIColor grayColor]
to boot. These last two can be animated, b.t.w.
Present another view with the shadow and the gradient etcetera over this view thus giving it an effect of graying out with shadows. You may even create an image if you know your photoshop. Just show that image on a UIImageView over this view to be blocked. Give the image some nice translucency, shadows etc etc
does anyone know why, if I add an image UIImage as background, I can clearly see it behind my grouped table view in Interface Builder.
However when I launch the app, the background is not showing at all, both in simulator and device.
Apart from adding the image, I suppose I already did all the steps at TableView programmatic side:
self.tableView.backgroundColor = [UIColor clearColor];
self.tableView.opaque = NO;
self.tableView.backgroundView = nil;
thanks
Following a post I made, I found two possible solutions, one with UIViewController in place of UITableVIewController as discussed here:
UITableView with fixed image background
with a disadvantage of header and footer problem with grouped table.
The other solution, involves writing more code and could be the case only if you have a common table that you share within different views of the apps: basically is to have a UIViewController calling a UITableViewController and attach its subview to self.view.