Questions tagged [programmatically-created]

Any object in an application created using a computer program rather than created manually using something in the userspace.

General Definition

Any object in an application created using a computer program rather than created manually using something in the userspace.

GUI Elements

In general, elements are declared in inside their accompanying tags in / files or in any other derivatives ( , , , , , and many others).

Programmatically created are those elements that are coded in contexts that need to be compiled to take effect at . They could be created at by a click of a as an example, where they would be coded inside a click listener for that .

438 questions
0
votes
1 answer

Add custom image UIButtons to a custom UIToolbar does not work right

I have implemented a custom UIToolBar with 4 UIbutton's. These buttons are button with Image. I have created them with this code: -(NSArray *)setButtonForToolBar { CGRect buttonFrame = { .origin.x = 0, .origin.y = 0, …
croigsalvador
  • 1,993
  • 2
  • 24
  • 47
0
votes
3 answers

Create multiple UIImageViews programmatically

I want to create multiple UIImageViews programmatically with different tags and add them as subview of my main view. I have a property of my UIImageView in header: @property (strong, nonatomic) UIImageView *grassImage; then i'm trying to create…
Vlad Z.
  • 3,401
  • 3
  • 32
  • 60
0
votes
1 answer

Error calling action for button in Objective C

I am creating an app in Objective C, and I am receiving a runtime error when I press the button in my app. This is the code that creates the buttons. Yes I do have to use the coded version, before anyone asks. extend = [UIButton…
0
votes
2 answers

UIButton: multiple buttons - how to detect event and find which button was tapped"

How can I detect which UIButton has been tapped: -(void) topScorer { UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom]; [button1 addTarget:self action:@selector(buttonClicked:) …
jeewan
  • 1,597
  • 5
  • 23
  • 40
0
votes
1 answer

Loop, generating buttons with functions from an array

For my iOS app I have an array of text, and I want to generate inside of my UIScrollview a list of text on the right hand side and a list of buttons on the left hand side. Whenever a user presses a UIButton from the right hand side the text from…
Albert Renshaw
  • 17,282
  • 18
  • 107
  • 195
0
votes
1 answer

Upraded Xcode, I have 2 Identicle views with UIScrollView. One View adds components to UIScroll fine, the other does not

I have an app that has been working just fine for ages. I upgraded XCode and now 1 of my views is doing weird things. None of the objects I attempt to add to the UIScrollview show up. I have 2 screens that are basically identical in code (i…
JMD
  • 1,540
  • 2
  • 24
  • 56
0
votes
3 answers

UIButton action doesn't work after some time (probably after some garbage collection)

I have a UIView with around 60 buttons who call the same method. When clicking the buttons, I open different images by this method - I use button tags to know which button was called and which image to display. Think about it like a gallery. As the…
andreas
  • 7,844
  • 9
  • 51
  • 72
-1
votes
2 answers

How to set Attributes in a Card View in Kotlin

I am designing a Feed in which I want the posts in the form of a Card which I implemented using design library of Google. I have created my layout but as the posts will be fetched dynamically therefore I wanted to dynamically create my layout in…
-1
votes
2 answers

RecyclerView vs Programmatically Created Views: Which one is better?

I want to put a list of items I am extracting from a firebase database. I was using RecyclerView for this but now I came to know that we can create Buttons, TextViews etc programmatically. I was wondering if there are any benefits of recyclerview or…
-1
votes
2 answers

Programmatically made view with rest of project in main.storyboard

I have a quick question for you guys that I havent found a definitive answer to. I have a app made with every viewcontroller designed in the main.storyboard. Recently I had to change out my table view viewcontroller for receiving data with…
-1
votes
2 answers

Unwind segues with programmatically created view controllers

I have a view controller (PhotoViewController) which has a child view controller (CameraViewController). In CameraViewController, there is a button that sets off a chain of segueing through other programmatically created view controllers. On the…
-1
votes
1 answer

How to create view controller that covers half the screen programmatically SWIFT

I am trying to create a view similar to Facebook so that when you click a button, a view controller covers half the sceeen like this: And then if you swipe up it covers the whole view like this: How would I go about doing this?
ayjoy
  • 155
  • 3
  • 10
-1
votes
1 answer

Create button programmatically and create next button from the first button with listener

I am wondering about this weird thing. I want to create a button and when the button is clicked I want a new button to be created and the old one removed, all with only code. Here is my code so far and it does not work as I had hoped. Any input…
-1
votes
2 answers

How to set unique ids to Views created in a loop so that UI Automator can see them

I have a bunch of Views added programmatically in a loop: for (int j = 0; j < size(); j++) { TextView xxxView = (TextView) LayoutInflater.from(getContext()).inflate(R.layout.xxx, container, false); xxxView.setId(k++); //this is not enough as…
-1
votes
1 answer

UIButton not showing the circle with "i" for .infoLight

For some reason the iOS button standard circle with an "i" in it for .infoLight isn't showing when I run the function below to programmatically add a UIButton (and I do want to do this programmatically rather than in the interface builder) - I'm…
Gallaugher
  • 1,593
  • 16
  • 27