Parse Your BLE Peripheral Device Characteristic in HEX String

#pragma mark – Peripheral Delegates – (void)peripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error { if (error) NSLog(@”Error reading BLE data: %@”,[error localizedDescription]); else [self parseBLEMessage:characteristic.value]; } – (void)parseBLEMessage:(NSData*)pobjData { NSData *objData = pobjData; NSString *strValue = [getHexString:objdata]; } -(NSString*)getHexString:(NSData*)pdata { NSMutableString *sbuf; NSUInteger capacity = self.length …

UITableViewCell does not set according to text/components after using UITableViewAutomaticDimension

To overcome this issue we have to set layout of the cell after inserting any values into cell. Refer below code: -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { CustomTableViewCell *cellCustom = (CustomTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cellCustom == nil) { cellCustom = [[CustomTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } …

Clear Cache Memory

override func didReceiveMemoryWarning() {     super.didReceiveMemoryWarning()     // Dispose of any resources that can be recreated..     removeCacheMemmory() } func removeCacheMemmory(){     SDWebImageManager.sharedManager().imageCache.clearMemory()     SDWebImageManager.sharedManager().imageCache.clearDisk()     SDImageCache.sharedImageCache().cleanDisk()     SDImageCache.sharedImageCache().clearMemory()     NSURLCache.sharedURLCache().removeAllCachedResponses() }