Questions tagged [addsubview]

Questions relating to the addSubView method of the Apple UIView class

Questions relating to the addSubView method of the Apple UIView class

540 questions
-1
votes
2 answers

Add subview to UITableViewCell as replacement for cell selection

In my tableview each cell gets a subview by didselectRowAtIndexPath to highlight the current selected row. Everything works fine but in the moment when the tableview was scrolled the subview won't hide from a cell which was selected before. In…
-1
votes
1 answer

Adding subviews to screen issue

I have a large amount of image buttons being added to the screen in an iPhone app. Everything is working fine with my code. The problem is the subviews are not displaying until every one of the subviews are ready to display. So for example I have 48…
RichAppz
  • 1,520
  • 2
  • 14
  • 27
-1
votes
1 answer

How do I add a subview which already has a UIView?

using the followings I can create a view and then load a nib into it: CGRect newViewRect = CGRectMake(0, self.view.bounds.size.width - 335, 335, 400); UIView *newView = [[UIView alloc] initWithFrame:newViewRect]; newView = [[[NSBundle mainBundle]…
Kourosh
  • 608
  • 2
  • 14
  • 34
-1
votes
2 answers

How to create a new textView every time when clicking on the same button?

I would like to create a new uitextview every time when the user click on the same uibutton. I've tried to write some codes but I can create one uitextview only. Would be glad if there's some sample code that can be provided to help me out. Thanks…
zeropt7
  • 73
  • 1
  • 9
-1
votes
1 answer

adding text field in table view on button click

I have a table view and in each row there is a add button on click the new row adding below i want that onclick the row has one text field in it and a user can enter a texh on it can you help me how to add a text field in the adding row. here is my…
Priyanka
  • 71
  • 1
  • 5
-1
votes
3 answers

Loading xib crashes app

Hello all I am having a issue with showing a xib file from the main file not sure why this is happening with some of the xib files and not others. if(segment == @"1"){ Results1 *myView1 = [[Results1 alloc]initWithNibName:@"Results1"…
Tim
  • 115
  • 1
  • 2
  • 10
-1
votes
1 answer

how to place a UIImageView in a particular area of a subView

I am woundering if there is a way of placing a UIImageView into a specific area of another view using addSubview this is how my code currently looks, I am woundering how I would add the image to a particular spot of the view its being added to, say…
HurkNburkS
  • 5,492
  • 19
  • 100
  • 183
-2
votes
1 answer

Are UIViews duplicated when adding a subview again in Swift?

I am wondering something about UIView, and adding subviews... So say I add a subview to a baseLayerView as so: self.newBaseLayer.addSubview(self.usernameLabel) The UIView hierarchy/structure will, correct me if I'm wrong, like…
user11199876
-2
votes
1 answer

Why adding subView to tableViewCell is added multiple times?

I want to add custom subView inside tableViewCell. Basically every time i click on the image inside cell. it will display custom subView with label on it. The link to my project is here The problem is when i click on the specific cell (0) for…
-2
votes
1 answer

How to centre a subview in UIView?

I am trying to create a timer. I have a circle using UIBezierPath which I will animate to show the time remaining. This is the code that draws the shape and adds it to the view: func drawBgShape() { bgShapeLayer.path = UIBezierPath(arcCenter:…
Will Taylor
  • 511
  • 1
  • 6
  • 14
-2
votes
1 answer

Swift ---UIView addSubView(UItextView),nothing can be displayed

class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. //let attstring = NSMutableAttributedString let testTextView =…
ZuKi Su
  • 1
  • 1
-2
votes
1 answer

UIView subView button not active

I'm want to add button into UIImageView. Added button not active. UIImageView *iview = [[UIImageView alloc] initWithImage:image]; iview.frame = [[UIScreen mainScreen] applicationFrame]; iview.contentMode = UIViewContentModeTopLeft; UIButton *bview1…
user3424037
  • 51
  • 1
  • 1
  • 10
-2
votes
1 answer

Merge two viewcontroller's code using addsubview in IOS

I want to break my code into 3 files and them up via addsubview. For ex. i have a masterview, mastreview contains a currentView. CurrentView contains 1 webview and 1 tableview. Now, i have written all code in one file and it works like a charm. But…
Sumitiscreative
  • 647
  • 3
  • 10
  • 24
-3
votes
2 answers

When does ViewWillAppear invoked?

If we are implementing a page control such that we are adding small controllers on the scrollview. Although adding controller's view as a subview is not a good practice, but if this is the implementation, then, while adding the controller's view as…
iOSDevD
  • 30
  • 1
-4
votes
1 answer

Swift fatal error: unexpectedly found nil while unwrapping an Optional value on segue

I know this is a crazy asked question, but I still can't figure it out. I am using a library for creating a circular progress bar (KDCircularProgress). Everything works fine, but the moment I try to call and perform a segue (for changing the…
Marius
  • 1
  • 3
1 2 3
35
36