« first day (2220 days earlier)      last day (1763 days later) » 

4:13 AM
Good Morning All
 
4:37 AM
Hi all Good morning
I have a question on MTLmodel ios as below:
I have a MTLModel I want to display key and value in table view:
Key should be left side of TableView mapped to its value to be displayed on Rightside
any idea how to display like this?
Sample code:
- (void)itemsDict {
NSDictionary *descItemsNotifiction;
NSMutableDictionary *itemsMutable;

for (int i = 0; i < self.itemsModel.count; i++) {
descItemsNotifiction = @{@"Damage": [self.itemsModel valueForKey:@"damage"][i],
@"Item Key" : [self.itemsModel valueForKey:@"itemKey"][i],
@"Notif Number": [self.itemsModel valueForKey:@"notifNo"][i],
@"Object Part" : [self.itemsModel valueForKey:@"objectPart"][i]
};
itemsMutable = [NSMutableDictionary dictionaryWithDictionary:descItemsNotifiction];
 
 
1 hour later…
5:47 AM
Morning
 
6:16 AM
@Shubhank hii bro
@Dhruv hii
 
Hi is there a way to arrange NSDictionary key value as per our choice?
 
hi
@Nagarjun yup, but you would have to make your own logic for it
 
How to download pdf and save in downloads of iphone in swift @Shubhank
 
save in downloads ?
 
in FileManager i suppose
download pdf from url
i tried one code
https://paste.ofcode.org/36RN2YYapZubbRVCe8qH65x
@Shubhank pls check this
it works fine
but if i will not save from UIActivityViewController then it will not save
and says file already exists
 
6:35 AM
hi
 
can u look my issue bro
 
@Shubhank How?
 
7
A: Sort Dictionary by keys

ElsammakI tried all of the above, in a nutshell all you need is let sorted = dictionary.sorted { $0.key < $1.key } let keysArraySorted = Array(sorted.map({ $0.key })) let valuesArraySorted = Array(sorted.map({ $0.value }))

 
6:51 AM
@Shubhank Not alphabetically
Like in screenshot dictionary
I want to display
1. Notification Number
2. Object Part
3. Item Key
4. Damage
 
 
2 hours later…
8:39 AM
@Shubhank ?
 
hey
@Nagarjun you should subclass NSDictionary to add a customSortedKeys property
 
@Shubhank have u checked my above code?
 
checking
i checked
 
ok bro
 
what issue you get?
 
8:51 AM
wait let me share what issue is with screenshot
i m getting this error

Error Domain=NSCocoaErrorDomain Code=516 "“CFNetworkDownload_9vnfBg.tmp” couldn’t be copied to “Documents” because an item with the same name already exists." UserInfo={NSSourceFilePathErrorKey=/private/var/mobile/Containers/Data/Application/4BFC6D09-4607-48BE-9864-5B05499FB761/tmp/CFNetworkDownload_9vnfBg.tmp, NSUserStringVariant=(
Copy
), NSDestinationFilePath=/var/mobile/Containers/Data/Application/4BFC6D09-4607-48BE-9864-5B05499FB761/Documents/SwiftLanguage.pdf, NSFilePath=/private/var/mobile/Containers/Data/Application/4BFC6D09-4607-48BE-9864-5B05499FB761/tmp/CF
@Shubhank
 
9:11 AM
.tmp file ?
 
wait let me share screenshot bro
then i will explain . what issue i m facing
these are two screens when i click on "Print" button i m getting airDrop activity when i can click on Save to save pdf if i do it saves properly
and if doesnot save in same scenario it shows same name already exists
@Shubhank
 
9:51 AM
@Shubhank how?
 
wait
sorry have to take an interview
 
for position?
BTW I am available...
:P
 
@Jamil can u have a look to my question bro
 
which question
 
pls read my above messages
i have shared screenshots also
 
 
1 hour later…
11:23 AM
@DilipTiwari
hi
 
hello bro
@Shubhank
 
11:59 AM
Hello people !
So, I have android experience, and learning iOS now.
And I am not really able to understand how to get setup background operations.
Operations like : automatic data update from APIs, download large quantities of data, and playing music.
 
yes @DilipTiwari what issue
@ZeekHuge alamofire for data requests, and playing music is MPMediaPlayer check framework for Media
 

« first day (2220 days earlier)      last day (1763 days later) »