Now I will show you how to use Generic RecycleView for different View Types. First of creating Generic Recycleview Adapter (GenericAdapter) class as below. import android.support.v7.widget.RecyclerView import android.view.LayoutInflater import android.view.View import android.view.ViewGroup abstract class GenericAdapter : RecyclerView.Adapter { var listItems: List constructor(listItems: List) { this.listItems …
Technology
UICollectionView Auto Slider
Collection view auto scroll Data Like (Slider) Collection view scroll automatically next page every 3.0 seconds First Outlet Of CollectionView @IBOutlet weak var cvWeeklyDeals: UICollectionView! 2. creating Timer to call every 3.0 seconds call to method func startTimer() { let timer = Timer.scheduledTimer(timeInterval: 3.0, …
UITableView – Reverse Pagination
As a solution i found that we need to transform our UITableview. So all the contents in the UItableview are transformed. You need to transform Cell, You need to implement header instead of footer and vice-versa. We need much more time to do this, so …
Bootstrap 4 Multi-slide jQuery Slider
Check here:- http://inheritxdev.net/CPT/new_inx/
Sample code for sending push notifications
Please update the code a/c to requirements. Sample Code Please update if any better alternative.
Issue in file upload through PHP – cURL
Problem File not being uploaded on server through PHP – cURL Solution The CURLFile interface must be used to upload files. Code <?php $url = ‘http://192.168.1.94:5000/api/v1/upload-picture’; $img = ‘img/placeholder.png’; // Form-data $data_array = array( ‘id’ => 1, ‘picture_type’ => ‘user’, ‘file’ => new CurlFile($img) …
Change format of date/string like 5:00 to 05:00
-(NSString *)setDateInFormat:(NSString *)strTxt { NSArray *arr = [strTxt componentsSeparatedByString:@”:”]; NSString *str = [arr objectAtIndex:0]; if ([str length] < 2) { if (![str hasPrefix:@”0″]) { …
Compress image without changing image dimensions
We have to write a single line to compress the image at a time when we are uploading our image to a server. NSData *dataForPNGFile = UIImageJPEGRepresentation(imgPicked, 0.0f); 0.0f is the maximum & 1.0f is the minimum compress ratio we can change based on our …
Stop iOS Mobile from giving input buttons rounded corners and shade
we have to add css for this like as under input, textarea { -webkit-appearance: none; -webkit-border-radius: 0; }
Use UIView as UIButton…..
Give UIControl class to UIView then we can access that as UIButton.Add event like Touch Up Inside, touchDown… etc.