Posts

Showing posts with the label objective c

Frame vs bounds in Swift

Image
1 ,  Frame The  frame  of an  UIView  is the  rectangle , expressed as a location (x,y) and size (width, height) relative to the superview it is contained within. In short ,  a view's location and size using the  parent view's coordinate system 2 ,  Bounds The  bounds  of an  UIView  is the  rectangle , expressed as a location (x,y) and size (width, height) relative to its own coordinate system (0,0).   In short ,  a view's location and size using  its own coordinate system Example: Frame origin = ( 40 , 60 ) width = 80 height = 130 Bounds origin = ( 0 , 0 ) width = 80 height = 130 Thanks for reading, Happy Coding  👨‍💻  

How to use UITableView

Image
How to use UITableView in iOS using Objective-c Step:1- Select Single view Application Step:2- Give Project name  Step:3- Drag and drop UITableView Step:4- Right click your tableview and set datasource and delegate method Step:5- Declare array in .h file Step:6- Write these code in .h file Step:7- Finally Command+r to run your code